import "../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import SettingItem from "../../../../../components/Pages/ChartItemSetting/SettingItem.vue2.mjs";
import SettingItemBox from "../../../../../components/Pages/ChartItemSetting/SettingItemBox.vue.mjs";
import _sfc_main$2 from "../../../../../components/Pages/ChartItemSetting/CollapseItem.vue.mjs";
import _sfc_main$1 from "../../../../../components/Pages/ChartItemSetting/GlobalSetting.vue2.mjs";
import "../../../../../../node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs";
import "../../../../../../node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.mjs";
import "../../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.mjs";
import "../../../../../enums/pageEnum.mjs";
import "../../../../../router/index.mjs";
import "../../../../../store/modules/designStore/designStore.mjs";
import "../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.mjs";
import "../../../../../components/GoSkeleton/index.vue.mjs";
import "../../../../../components/GoLoading/index.mjs";
import "../../../../../settings/designSetting.mjs";
import "../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.mjs";
import { RadarShapeEnumList } from "./config.mjs";
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createTextVNode } from "../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { reactive, unref } from "../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "config",
  props: {
    optionData: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const radarConfig = computed(() => {
      return props.optionData.radar;
    });
    const radarProp = reactive({
      radius: [0, 60],
      center: [50, 50]
    });
    const updateRadius0 = (value) => {
      props.optionData.radar.radius[0] = `${value}%`;
    };
    const updateRadius1 = (value) => {
      props.optionData.radar.radius[1] = `${value}%`;
    };
    const updateCenter0 = (value) => {
      props.optionData.radar.center[0] = `${value}%`;
    };
    const updateCenter1 = (value) => {
      props.optionData.radar.center[1] = `${value}%`;
    };
    const sliderFormatTooltip = (v) => {
      return `${v}%`;
    };
    return (_ctx, _cache) => {
      const _component_n_checkbox = resolveComponent("n-checkbox");
      const _component_n_select = resolveComponent("n-select");
      const _component_n_slider = resolveComponent("n-slider");
      const _component_n_color_picker = resolveComponent("n-color-picker");
      const _component_n_input_number = resolveComponent("n-input-number");
      return openBlock(), createElementBlock("div", null, [
        createVNode(unref(_sfc_main$1), { optionData: __props.optionData }, null, 8, ["optionData"]),
        createVNode(unref(_sfc_main$2), {
          name: "雷达",
          expanded: true
        }, {
          default: withCtx(() => [
            createVNode(unref(SettingItemBox), { name: "样式" }, {
              default: withCtx(() => [
                createVNode(unref(SettingItem), null, {
                  default: withCtx(() => [
                    createVNode(_component_n_checkbox, {
                      checked: radarConfig.value.splitArea.show,
                      "onUpdate:checked": _cache[0] || (_cache[0] = ($event) => radarConfig.value.splitArea.show = $event)
                    }, {
                      default: withCtx(() => [
                        createTextVNode("背景")
                      ]),
                      _: 1
                    }, 8, ["checked"])
                  ]),
                  _: 1
                }),
                createVNode(unref(SettingItem), null, {
                  default: withCtx(() => [
                    createVNode(_component_n_checkbox, {
                      checked: radarConfig.value.splitLine.show,
                      "onUpdate:checked": _cache[1] || (_cache[1] = ($event) => radarConfig.value.splitLine.show = $event)
                    }, {
                      default: withCtx(() => [
                        createTextVNode("分割线")
                      ]),
                      _: 1
                    }, 8, ["checked"])
                  ]),
                  _: 1
                }),
                createVNode(unref(SettingItem), { name: "雷达形状" }, {
                  default: withCtx(() => [
                    createVNode(_component_n_select, {
                      value: radarConfig.value.shape,
                      "onUpdate:value": _cache[2] || (_cache[2] = ($event) => radarConfig.value.shape = $event),
                      size: "small",
                      options: unref(RadarShapeEnumList),
                      placeholder: "选择形状"
                    }, null, 8, ["value", "options"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            createVNode(unref(SettingItemBox), { name: "坐标轴" }, {
              default: withCtx(() => [
                createVNode(unref(SettingItem), null, {
                  default: withCtx(() => [
                    createVNode(_component_n_checkbox, {
                      checked: radarConfig.value.axisLine.show,
                      "onUpdate:checked": _cache[3] || (_cache[3] = ($event) => radarConfig.value.axisLine.show = $event)
                    }, {
                      default: withCtx(() => [
                        createTextVNode("轴线")
                      ]),
                      _: 1
                    }, 8, ["checked"])
                  ]),
                  _: 1
                }),
                createVNode(unref(SettingItem), null, {
                  default: withCtx(() => [
                    createVNode(_component_n_checkbox, {
                      checked: radarConfig.value.axisTick.show,
                      "onUpdate:checked": _cache[4] || (_cache[4] = ($event) => radarConfig.value.axisTick.show = $event)
                    }, {
                      default: withCtx(() => [
                        createTextVNode("刻度")
                      ]),
                      _: 1
                    }, 8, ["checked"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            createVNode(unref(SettingItemBox), { name: "范围" }, {
              default: withCtx(() => [
                createVNode(unref(SettingItem), {
                  name: `最小值：${radarProp.radius[0]}%`
                }, {
                  default: withCtx(() => [
                    createVNode(_component_n_slider, {
                      value: radarProp.radius[0],
                      "onUpdate:value": [
                        _cache[5] || (_cache[5] = ($event) => radarProp.radius[0] = $event),
                        updateRadius0
                      ],
                      min: 0,
                      max: 100,
                      "format-tooltip": sliderFormatTooltip
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }, 8, ["name"]),
                createVNode(unref(SettingItem), {
                  name: `最大值：${radarProp.radius[1]}%`
                }, {
                  default: withCtx(() => [
                    createVNode(_component_n_slider, {
                      value: radarProp.radius[1],
                      "onUpdate:value": [
                        _cache[6] || (_cache[6] = ($event) => radarProp.radius[1] = $event),
                        updateRadius1
                      ],
                      min: 0,
                      max: 100,
                      "format-tooltip": sliderFormatTooltip
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }, 8, ["name"])
              ]),
              _: 1
            }),
            createVNode(unref(SettingItemBox), { name: "偏移" }, {
              default: withCtx(() => [
                createVNode(unref(SettingItem), {
                  name: `X 轴值：${radarProp.center[0]}%`
                }, {
                  default: withCtx(() => [
                    createVNode(_component_n_slider, {
                      value: radarProp.center[0],
                      "onUpdate:value": [
                        _cache[7] || (_cache[7] = ($event) => radarProp.center[0] = $event),
                        updateCenter0
                      ],
                      min: 0,
                      max: 100,
                      "format-tooltip": sliderFormatTooltip
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }, 8, ["name"]),
                createVNode(unref(SettingItem), {
                  name: `Y 轴值：${radarProp.center[1]}%`
                }, {
                  default: withCtx(() => [
                    createVNode(_component_n_slider, {
                      value: radarProp.center[1],
                      "onUpdate:value": [
                        _cache[8] || (_cache[8] = ($event) => radarProp.center[1] = $event),
                        updateCenter1
                      ],
                      min: 0,
                      max: 100,
                      "format-tooltip": sliderFormatTooltip
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }, 8, ["name"])
              ]),
              _: 1
            }),
            createVNode(unref(SettingItemBox), { name: "指示器" }, {
              default: withCtx(() => [
                createVNode(unref(SettingItem), { name: "颜色" }, {
                  default: withCtx(() => [
                    createVNode(_component_n_color_picker, {
                      size: "small",
                      modes: ["hex"],
                      value: radarConfig.value.axisName.color,
                      "onUpdate:value": _cache[9] || (_cache[9] = ($event) => radarConfig.value.axisName.color = $event)
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }),
                createVNode(unref(SettingItem), { name: "大小" }, {
                  default: withCtx(() => [
                    createVNode(_component_n_input_number, {
                      value: radarConfig.value.axisName.fontSize,
                      "onUpdate:value": _cache[10] || (_cache[10] = ($event) => radarConfig.value.axisName.fontSize = $event),
                      size: "small",
                      min: 9
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }),
                createVNode(unref(SettingItem), null, {
                  default: withCtx(() => [
                    createVNode(_component_n_checkbox, {
                      checked: radarConfig.value.axisName.show,
                      "onUpdate:checked": _cache[11] || (_cache[11] = ($event) => radarConfig.value.axisName.show = $event)
                    }, {
                      default: withCtx(() => [
                        createTextVNode("文字标签")
                      ]),
                      _: 1
                    }, 8, ["checked"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            createVNode(unref(SettingItemBox), {
              name: "系列",
              alone: true
            }, {
              default: withCtx(() => [
                createVNode(unref(SettingItem), { name: "背景透明度" }, {
                  default: withCtx(() => [
                    createVNode(_component_n_input_number, {
                      value: __props.optionData.series[0].areaStyle.opacity,
                      "onUpdate:value": _cache[12] || (_cache[12] = ($event) => __props.optionData.series[0].areaStyle.opacity = $event),
                      size: "small",
                      min: 0,
                      max: 1,
                      step: 0.1
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ]);
    };
  }
});
export {
  _sfc_main as default
};
