<template>
  <CollapseItem name="默认方法设置" :expanded="true">
    <n-space>
      <n-switch v-model:value="optionData.dataStyle.defaultCloseModal" size="small" />
      <n-text>默认点击隐藏弹窗及其所在分组的内容</n-text>
    </n-space>
  </CollapseItem>
  <CollapseItem name="数据设置" :expanded="true">
    <SettingItemBox :alone="true" name="按钮内容">
      <SettingItem name="按钮文字内容手动输入">
        <n-input v-model:value="optionData.dataset.value" type="text" size="small" />
      </SettingItem>
    </SettingItemBox>
    <SettingItemBox name="按钮样式">
      <SettingItem name="标题字体颜色">
        <n-color-picker
          size="small"
          :modes="['rgb']"
          v-model:value="optionData.dataStyle.buttonFontColor"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="标题字体大小">
        <n-input-number
          v-model:value="optionData.dataStyle.buttonFontSize"
          :min="0"
          size="small"
          placeholder="标题字体大小"
        ></n-input-number>
      </SettingItem>
    </SettingItemBox>
  </CollapseItem>
</template>

<script setup lang="ts">
  import { PropType, watch, ref } from 'vue';
  import { option } from './config';
  import { cloneDeep } from 'lodash-es';
  import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting';

  const props = defineProps({
    optionData: {
      type: Object as PropType<typeof option>,
      required: true,
    },
  });
</script>
