<template>
  <CollapseItem name="标记设置" :expanded="true">
    <SettingItemBox name="标记样式">
      <SettingItem name="宽度">
        <n-input-number
          v-model:value="optionData.typeStyle.width"
          :min="0"
          size="small"
          placeholder="宽度"
        ></n-input-number>
      </SettingItem>
      <SettingItem name="高度">
        <n-input-number
          v-model:value="optionData.typeStyle.height"
          :min="0"
          size="small"
          placeholder="高度"
        ></n-input-number>
      </SettingItem>
      <SettingItem name="标识颜色1">
        <n-color-picker
          size="small"
          :modes="['rgb']"
          v-model:value="optionData.typeStyle.typeColor1"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="标识标题1">
        <n-input
          v-model:value="optionData.typeStyle.typeTitle1"
          size="small"
          placeholder="标识标题1"
        ></n-input>
      </SettingItem>
      <SettingItem name="标识颜色2">
        <n-color-picker
          size="small"
          :modes="['rgb']"
          v-model:value="optionData.typeStyle.typeColor2"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="标识标题2">
        <n-input
          v-model:value="optionData.typeStyle.typeTitle2"
          size="small"
          placeholder="标识标题2"
        ></n-input>
      </SettingItem>
      <SettingItem name="标识字体颜色">
        <n-color-picker
          size="small"
          :modes="['rgb']"
          v-model:value="optionData.typeStyle.typeFontColor"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="标识字体大小">
        <n-input-number
          v-model:value="optionData.typeStyle.typeFontSize"
          :min="0"
          size="small"
          placeholder="标识字体大小"
        ></n-input-number>
      </SettingItem>
    </SettingItemBox>
  </CollapseItem>
  <CollapseItem name="数据设置" :expanded="true">
    <SettingItemBox name="数据样式">
      <SettingItem name="字体颜色1">
        <n-color-picker
          size="small"
          :modes="['rgb']"
          v-model:value="optionData.dataStyle.fontColor1"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="字体颜色2">
        <n-color-picker
          size="small"
          :modes="['rgb']"
          v-model:value="optionData.dataStyle.fontColor2"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="字体大小1">
        <n-input-number
          v-model:value="optionData.dataStyle.fontSize1"
          size="small"
          :min="0"
          placeholder="字体大小1"
        ></n-input-number>
      </SettingItem>
      <SettingItem name="字体大小2">
        <n-input-number
          v-model:value="optionData.dataStyle.fontSize2"
          size="small"
          :min="0"
          placeholder="字体大小2"
        ></n-input-number>
      </SettingItem>
      <SettingItem name="字体大小3">
        <n-input-number
          v-model:value="optionData.dataStyle.fontSize3"
          size="small"
          :min="0"
          placeholder="字体大小3"
        ></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>
