<template>
  <CollapseItem name="按钮设置" :expanded="true">
    <SettingItemBox name="内容设置">
      <SettingItem name="按钮常用颜色">
        <n-select v-model:value="optionData.frameStyle.color" :options="colorList" size="small" />
      </SettingItem>
      <SettingItem name="按钮字体大小">
        <n-input-number
          v-model:value="optionData.frameStyle.fontsize"
          type="text"
          :min="0"
          size="small"
        />
      </SettingItem>
      <SettingItem name="按钮字体颜色">
        <n-color-picker
          size="small"
          :modes="['hex']"
          v-model:value="optionData.frameStyle.fontcolor"
        ></n-color-picker>
      </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,
    },
  });

  const colorList = [
    {
      value: 'red',
      label: '红色',
    },
    {
      value: 'green',
      label: '绿色',
    },
    {
      value: 'yellow',
      label: '黄色',
    },
  ];
</script>
