<template>
  <CollapseItem name="数据设置" :expanded="true">
    <SettingItemBox :alone="true" name="图片路径选择">
      <SettingItem>
        <n-select v-model:value="optionData.dataset.url" size="small" :options="options"></n-select>
      </SettingItem>
    </SettingItemBox>
    <SettingItemBox :alone="true" name="图片路径手动输入">
      <SettingItem>
        <n-input
          v-model:value="optionData.dataset.url"
          placeholder="图片路径"
          type="text"
          size="small"
        />
      </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 options = [
    { label: '卫星例图', value: 'src/assets/images/chart/zhigan/component/example1.png' },
    { label: '无人机例图', value: 'src/assets/images/chart/zhigan/component/example2.png' },
  ];
</script>
