"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const config = require("./config.js");
const SettingItem = require("../../../../../components/Pages/ChartItemSetting/SettingItem.vue2.js");
const SettingItemBox = require("../../../../../components/Pages/ChartItemSetting/SettingItemBox.vue.js");
const CollapseItem_vue_vue_type_script_setup_true_lang = require("../../../../../components/Pages/ChartItemSetting/CollapseItem.vue.js");
const GlobalSetting_vue_vue_type_script_setup_true_lang = require("../../../../../components/Pages/ChartItemSetting/GlobalSetting.vue2.js");
require("../../../../../../node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.js");
require("../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js");
require("../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js");
require("../../../../../../node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.js");
require("../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js");
require("../../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.js");
require("../../../../../enums/pageEnum.js");
require("../../../../../router/index.js");
require("../../../../../store/modules/designStore/designStore.js");
require("../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.js");
require("../../../../../components/GoSkeleton/index.vue.js");
require("../../../../../components/GoLoading/index.js");
require("../../../../../settings/designSetting.js");
require("../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.js");
const runtimeCore_esmBundler = require("../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
const reactivity_esmBundler = require("../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "config",
  props: {
    optionData: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const series = runtimeCore_esmBundler.computed(() => {
      const { width, height, rotationStep } = props.optionData.series[0];
      return {
        width: +width.replace("%", ""),
        height: +height.replace("%", ""),
        rotationStep
      };
    });
    const sliderFormatTooltip = (v) => {
      return `${v}%`;
    };
    const updateWidth = (value) => {
      props.optionData.series[0].width = `${value}%`;
    };
    const updateHeight = (value) => {
      props.optionData.series[0].height = `${value}%`;
    };
    const updateRotation = (value) => {
      props.optionData.series[0].rotationStep = value;
      props.optionData.series[0].rotationRange = value === 0 ? [0, 0] : [-90, 90];
    };
    return (_ctx, _cache) => {
      const _component_n_select = runtimeCore_esmBundler.resolveComponent("n-select");
      const _component_n_checkbox = runtimeCore_esmBundler.resolveComponent("n-checkbox");
      const _component_n_slider = runtimeCore_esmBundler.resolveComponent("n-slider");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, [
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(GlobalSetting_vue_vue_type_script_setup_true_lang.default), { optionData: __props.optionData }, null, 8, ["optionData"]),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(CollapseItem_vue_vue_type_script_setup_true_lang.default), {
          name: "词云",
          expanded: ""
        }, {
          default: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), { name: "形状" }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), null, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_select, {
                      value: __props.optionData.series[0].shape,
                      "onUpdate:value": _cache[0] || (_cache[0] = ($event) => __props.optionData.series[0].shape = $event),
                      size: "small",
                      options: reactivity_esmBundler.unref(config.ShapeEnumList)
                    }, null, 8, ["value", "options"])
                  ]),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), null, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_checkbox, {
                      checked: __props.optionData.series[0].drawOutOfBound,
                      "onUpdate:checked": _cache[1] || (_cache[1] = ($event) => __props.optionData.series[0].drawOutOfBound = $event),
                      size: "small"
                    }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createTextVNode("允许出边")
                      ]),
                      _: 1
                    }, 8, ["checked"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), { name: "布局" }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "宽度" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_slider, {
                      value: series.value.width,
                      "onUpdate:value": [
                        _cache[2] || (_cache[2] = ($event) => series.value.width = $event),
                        updateWidth
                      ],
                      min: 0,
                      max: 100,
                      "format-tooltip": sliderFormatTooltip
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "高度" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_slider, {
                      value: series.value.height,
                      "onUpdate:value": [
                        _cache[3] || (_cache[3] = ($event) => series.value.height = $event),
                        updateHeight
                      ],
                      min: 0,
                      max: 100,
                      "format-tooltip": sliderFormatTooltip
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), {
              name: "样式",
              alone: ""
            }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "字体区间(最小/最大字体)" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_slider, {
                      value: __props.optionData.series[0].sizeRange,
                      "onUpdate:value": _cache[4] || (_cache[4] = ($event) => __props.optionData.series[0].sizeRange = $event),
                      range: "",
                      step: 1,
                      min: 6,
                      max: 100
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "旋转角度" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_slider, {
                      value: series.value.rotationStep,
                      "onUpdate:value": [
                        _cache[5] || (_cache[5] = ($event) => series.value.rotationStep = $event),
                        updateRotation
                      ],
                      step: 15,
                      min: 0,
                      max: 45
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ], 64);
    };
  }
});
exports.default = _sfc_main;
