<template>
  <div>
    <collapse-item name="信息" :expanded="true">
      <setting-item-box name="场景 Code " :alone="true">
        <setting-item>
          <n-input v-model:value="optionData.sceneCode" type="textarea" size="small"></n-input>
        </setting-item>
      </setting-item-box>
    </collapse-item>
    <!-- 基础配置可以复用PieCommon的配置面板 -->
    <CollapseItem name="基础配置" :expanded="true">
      <SettingItemBox name="图例">
        <SettingItem name="显示">
          <n-switch v-model:value="optionData.legend.show" size="small" />
        </SettingItem>
      </SettingItemBox>
    </CollapseItem>
  </div>
</template>

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

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