<template>
  <CollapseItem name="标题" :expanded="true">
    <SettingItemBox name="样式">
      <SettingItem name="标题文字颜色">
        <n-color-picker
          size="small"
          :modes="['hex']"
          v-model:value="optionData.titleColor"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="标题文字大小">
        <n-input-number
          size="small"
          v-model:value="optionData.titleSize"
          :min="12"
        />
      </SettingItem>
    </SettingItemBox>
  </CollapseItem>
  <CollapseItem name="样式" :expanded="true">
    <SettingItemBox name="样式">
      <SettingItem name="文字颜色">
        <n-color-picker
          size="small"
          :modes="['hex']"
          v-model:value="optionData.desColor"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="文字大小">
        <n-input-number
          size="small"
          v-model:value="optionData.desSize"
          :min="12"
        />
      </SettingItem>
    </SettingItemBox>
  </CollapseItem>
  <CollapseItem name="样式" :expanded="true">
    <SettingItemBox name="样式">
      <SettingItem name="文字颜色">
        <n-color-picker
          size="small"
          :modes="['hex']"
          v-model:value="optionData.datasColor"
        ></n-color-picker>
      </SettingItem>
      <SettingItem name="文字大小">
        <n-input-number
          size="small"
          v-model:value="optionData.datasSize"
          :min="12"
        />
      </SettingItem>
    </SettingItemBox>
  </CollapseItem>
</template>

<script setup lang="ts">
import { PropType } from 'vue'
import {
  CollapseItem,
  SettingItemBox,
  SettingItem
} from '@/components/Pages/ChartItemSetting'
import { option } from './config'

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