<template>
  <div class="ModalButton">
    <n-button text>
      <Button :w="w" :h="h" :buttonName="option.buttonName" :buttonStyle="option.buttonStyle" />
    </n-button>
  </div>
</template>

<script setup lang="ts">
  import { computed, PropType, toRefs, watch, reactive, ref } from 'vue';
  import { CreateComponentType } from '@/packages/index.d';
  import { icon } from '@/plugins';
  import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
  import { useChartDataFetch } from '@/hooks';
  import Button from './svg/button.vue';

  const props = defineProps({
    chartConfig: {
      type: Object as PropType<CreateComponentType>,
      required: true,
    },
  });

  const { w, h } = toRefs(props.chartConfig.attr);

  const option = reactive({
    buttonName: props.chartConfig.option.buttonName,
    buttonStyle: props.chartConfig.option.buttonStyle,
  });
</script>

<style lang="scss" scoped>
  .ModalButton {
    display: flex;
    justify-content: center;
    text-align: center;
    width: v-bind('`${w}px`');
    height: v-bind('`${h}px`');
  }
</style>
