<template>
  <collapse-item name="地图场景" :expanded="true">


    <setting-item-box name="经度" :alone="true">
      <n-input-number v-model:value="optionData.mapOptions.scene.center.lng" :show-button="false" size="small">
        <template #suffix>°</template>
      </n-input-number>
    </setting-item-box>

    <setting-item-box name="纬度" :alone="true">
      <n-input-number v-model:value="optionData.mapOptions.scene.center.lat" :show-button="false" size="small">
        <template #suffix>°</template>
      </n-input-number>
    </setting-item-box>

    <setting-item-box name="高度值" :alone="true">
      <n-input-number v-model:value="optionData.mapOptions.scene.center.alt" :min="0" size="small"></n-input-number>
    </setting-item-box>

    <setting-item-box name="方向角度" :alone="true">
      <n-input-number v-model:value="optionData.mapOptions.scene.center.heading" :min="0" size="small"></n-input-number>
    </setting-item-box>

    <setting-item-box name="俯仰角" :alone="true">
      <n-input-number v-model:value="optionData.mapOptions.scene.center.pitch" :min="-90" size="small"></n-input-number>
    </setting-item-box>


    <setting-item-box name="是否显示太阳" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.scene.showSun" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>


    <setting-item-box name="是否显示月亮" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.scene.showMoon" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="是否显示默认天空盒" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.scene.showSkyBox" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="是否显示地球大气层外光圈" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.scene.showSkyAtmosphere" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="是否启用雾化效果" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.scene.fog" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="是否开启快速抗锯齿" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.showLabel" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

  </collapse-item>

  <collapse-item name="地图控件" :expanded="true">

    <setting-item-box name="底图切换按钮" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.control.baseLayerPicker" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="视角复位按钮" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.control.homeButton" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="二三维切换按钮" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.control.sceneModePicker" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

    <setting-item-box name="全屏按钮" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.control.fullscreenButton" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>



  </collapse-item>

  <collapse-item name="地形设置" :expanded="true">

    <setting-item-box name="是否开启地形" :alone="true">
      <setting-item>
        <n-space>
          <n-switch v-model:value="optionData.mapOptions.terrain.show" size="small" />
          <n-text>是否显示</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>

  </collapse-item>
<!-- 
  <collapse-item name="底图图层" :expanded="true">

  </collapse-item> -->

  <collapse-item name="右键菜单" :expanded="true">

  

  </collapse-item>
</template>

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

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

console.log("props.optionData",props.optionData);



const themeOptions = [
  {
    value: ThemeEnum.NORMAL,
    label: '标准'
  },
  {
    value: ThemeEnum.DARK,
    label: '幻影黑'
  },
  {
    value: ThemeEnum.LIGHT,
    label: '月光银'
  },
  {
    value: ThemeEnum.WHITES_MOKE,
    label: '远山黛'
  },
  {
    value: ThemeEnum.FRESH,
    label: '草色青'
  },
  {
    value: ThemeEnum.GREY,
    label: '雅士灰'
  },
  {
    value: ThemeEnum.GRAFFITI,
    label: '涂鸦'
  },
  {
    value: ThemeEnum.MACARON,
    label: '马卡龙'
  },
  {
    value: ThemeEnum.BLUE,
    label: '靛青蓝'
  },
  {
    value: ThemeEnum.DARKBLUE,
    label: '极夜蓝'
  },
  {
    value: ThemeEnum.WINE,
    label: '酱籽'
  }
]

const langOptions = [
  {
    value: LangEnum.ZH_CN,
    label: '中文简体'
  },
  {
    value: LangEnum.EN,
    label: '英文'
  },
  {
    value: LangEnum.ZH_EN,
    label: '中英文对照'
  }
]

const viewModeOptions = [
  {
    value: ViewModeEnum.PLANE,
    label: '2D'
  },
  {
    value: ViewModeEnum.STEREOSCOPIC,
    label: '3D'
  }
]

const featuresOptions = [
  {
    value: FeaturesEnum.BG,
    label: '区域面'
  },
  {
    value: FeaturesEnum.POINT,
    label: '标注'
  },
  {
    value: FeaturesEnum.ROAD,
    label: '道路'
  },
  {
    value: FeaturesEnum.BUILDING,
    label: '建筑物'
  }
]

const MarkerOptions = [
  {
    value: MarkerEnum.CIRCLE_MARKER,
    label: '圆形标点'
  },
  {
    value: MarkerEnum.MARKER,
    label: '定位标点'
  },
  {
    value: MarkerEnum.NONE,
    label: '隐藏标点'
  }
]
</script>
