<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">

    <setting-item-box name="地图底图" :alone="true">
      <!-- <n-select v-model:value="optionData.mapOptions.basemaps" size="small" :options="themeOptions" /> -->
    </setting-item-box>

  </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
  }
})



props.optionData.mapOptions.basemaps =  [
    {
			"id": 10,
			"name": "地图底图",
			"type": "group"
		},
		{
			"id": 2021,
			"pid": 10,
			"name": "天地图影像",
			"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png",
			"type": "group",
			"layers": [
        {
					"name": "底图",
					"type": "tdt",
					"layer": "img_d"
				},
				{
					"name": "注记",
					"type": "tdt",
					"layer": "img_z"
				}
			],
			"show": true
		}
]


const themeOptions = [
  {
    value: ThemeEnum.NORMAL,
    label: '标准'
  }
]

</script>
