"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");
require("../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.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("../../../../../settings/designSetting.js");
require("../../../../../components/GoLoading/index.js");
require("../../../../../components/GoSkeleton/index.vue.js");
const icon = require("../../../../../plugins/icon.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");
require("../../../../../store/modules/chartEditStore/chartEditStore.js");
require("../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.js");
const interact = require("./interact.js");
const dayjs_min = require("../../../../../../node_modules/.pnpm/dayjs@1.11.9/node_modules/dayjs/dayjs.min.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 shared_esmBundler = require("../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.js");
const _hoisted_1 = /* @__PURE__ */ runtimeCore_esmBundler.createElementVNode("span", null, "打开页面时浏览器操作系统的系统时间+偏移量(单位)", -1);
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "config",
  props: {
    optionData: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const { HelpOutlineIcon } = icon.icon.ionicons5;
    const panelOptions = [
      {
        label: "下拉展示",
        value: 0
      },
      {
        label: "面板展示",
        value: 1
      }
    ];
    const datePickerTypeOptions = [
      {
        label: "日期",
        value: interact.ComponentInteractEventEnum.DATE
      },
      {
        label: "日期时间",
        value: interact.ComponentInteractEventEnum.DATE_TIME
      },
      {
        label: "日期范围",
        value: interact.ComponentInteractEventEnum.DATE_RANGE
      },
      {
        label: "月份",
        value: interact.ComponentInteractEventEnum.MONTH
      },
      {
        label: "月份范围",
        value: interact.ComponentInteractEventEnum.MONTH_RANGE
      },
      {
        label: "年份",
        value: interact.ComponentInteractEventEnum.YEAR
      },
      {
        label: "年份范围",
        value: interact.ComponentInteractEventEnum.YEAR_RANGE
      },
      {
        label: "季度",
        value: interact.ComponentInteractEventEnum.QUARTER
      },
      {
        label: "季度范围",
        value: interact.ComponentInteractEventEnum.QUARTER_RANGE
      }
    ];
    const defaultTypeOptions = [
      {
        label: "静态",
        value: interact.DefaultTypeEnum.STATIC
      },
      {
        label: "动态",
        value: interact.DefaultTypeEnum.DYNAMIC
      },
      {
        label: "无",
        value: interact.DefaultTypeEnum.NONE
      }
    ];
    const differUnitOptions = [
      // ManipulateType
      {
        value: interact.DifferUnitEnum.DAY,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.DAY]
      },
      {
        value: interact.DifferUnitEnum.WEEK,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.WEEK]
      },
      {
        value: interact.DifferUnitEnum.MONTH,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.MONTH]
      },
      {
        value: interact.DifferUnitEnum.QUARTER,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.QUARTER]
      },
      {
        value: interact.DifferUnitEnum.YEAR,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.YEAR]
      },
      {
        value: interact.DifferUnitEnum.HOUR,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.HOUR]
      },
      {
        value: interact.DifferUnitEnum.MINUTE,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.MINUTE]
      },
      {
        value: interact.DifferUnitEnum.SECOND,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.SECOND]
      },
      {
        value: interact.DifferUnitEnum.MILLISECOND,
        label: interact.DifferUnitObject[interact.DifferUnitEnum.MILLISECOND]
      }
    ];
    const isRange = runtimeCore_esmBundler.computed(() => {
      return props.optionData.componentInteractEventKey.endsWith("range");
    });
    const differValueName = runtimeCore_esmBundler.computed(() => {
      return isRange.value ? "开始值动态偏移量" : "动态偏移量";
    });
    const differUnitName = runtimeCore_esmBundler.computed(() => {
      return isRange.value ? "开始值偏移单位" : "偏移单位";
    });
    const datePickerTypeUpdate = () => {
      props.optionData.dataset = isRange.value ? [dayjs_min.default().valueOf(), dayjs_min.default().valueOf()] : dayjs_min.default().valueOf();
    };
    const defaultTypeUpdate = (v) => {
      if (v === interact.DefaultTypeEnum.STATIC) {
        datePickerTypeUpdate();
      } else {
        props.optionData.dataset = null;
      }
    };
    return (_ctx, _cache) => {
      const _component_n_select = runtimeCore_esmBundler.resolveComponent("n-select");
      const _component_n_date_picker = runtimeCore_esmBundler.resolveComponent("n-date-picker");
      const _component_n_text = runtimeCore_esmBundler.resolveComponent("n-text");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_tooltip = runtimeCore_esmBundler.resolveComponent("n-tooltip");
      const _component_n_input_number = runtimeCore_esmBundler.resolveComponent("n-input-number");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, [
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(CollapseItem_vue_vue_type_script_setup_true_lang.default), {
          name: "展示方式",
          expanded: true
        }, {
          default: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), { name: "选择方式" }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(_component_n_select, {
                  value: __props.optionData.isPanel,
                  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => __props.optionData.isPanel = $event),
                  size: "small",
                  options: panelOptions
                }, null, 8, ["value"])
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(CollapseItem_vue_vue_type_script_setup_true_lang.default), {
          name: "时间配置",
          expanded: true
        }, {
          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), { name: "类型" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_select, {
                      value: __props.optionData.componentInteractEventKey,
                      "onUpdate:value": [
                        _cache[1] || (_cache[1] = ($event) => __props.optionData.componentInteractEventKey = $event),
                        datePickerTypeUpdate
                      ],
                      size: "small",
                      options: datePickerTypeOptions
                    }, null, 8, ["value"])
                  ]),
                  _: 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_select, {
                      value: __props.optionData.defaultType,
                      "onUpdate:value": [
                        _cache[2] || (_cache[2] = ($event) => __props.optionData.defaultType = $event),
                        defaultTypeUpdate
                      ],
                      size: "small",
                      options: defaultTypeOptions
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            __props.optionData.defaultType === reactivity_esmBundler.unref(interact.DefaultTypeEnum).STATIC ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(reactivity_esmBundler.unref(SettingItemBox.default), {
              key: 0,
              alone: true
            }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "静态默认值" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_date_picker, {
                      size: "small",
                      clearable: "",
                      value: __props.optionData.dataset,
                      "onUpdate:value": _cache[3] || (_cache[3] = ($event) => __props.optionData.dataset = $event),
                      type: __props.optionData.componentInteractEventKey
                    }, null, 8, ["value", "type"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })) : runtimeCore_esmBundler.createCommentVNode("", true),
            __props.optionData.defaultType === reactivity_esmBundler.unref(interact.DefaultTypeEnum).DYNAMIC ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(reactivity_esmBundler.unref(SettingItemBox.default), { key: 1 }, {
              name: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(_component_n_text),
                runtimeCore_esmBundler.createVNode(_component_n_tooltip, { trigger: "hover" }, {
                  trigger: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_icon, {
                      size: "21",
                      depth: 3
                    }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(HelpOutlineIcon))
                      ]),
                      _: 1
                    })
                  ]),
                  default: runtimeCore_esmBundler.withCtx(() => [
                    _hoisted_1
                  ]),
                  _: 1
                })
              ]),
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: differValueName.value }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_input_number, {
                      value: __props.optionData.differValue[0],
                      "onUpdate:value": _cache[4] || (_cache[4] = ($event) => __props.optionData.differValue[0] = $event),
                      class: "input-num-width",
                      size: "small"
                    }, {
                      suffix: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(reactivity_esmBundler.unref(interact.DifferUnitObject)[__props.optionData.differUnit[0]]), 1)
                      ]),
                      _: 1
                    }, 8, ["value"])
                  ]),
                  _: 1
                }, 8, ["name"]),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: differUnitName.value }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_select, {
                      value: __props.optionData.differUnit[0],
                      "onUpdate:value": _cache[5] || (_cache[5] = ($event) => __props.optionData.differUnit[0] = $event),
                      size: "small",
                      options: differUnitOptions
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                }, 8, ["name"]),
                isRange.value ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(reactivity_esmBundler.unref(SettingItem.default), {
                  key: 0,
                  name: "结束值动态偏移量"
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_input_number, {
                      value: __props.optionData.differValue[1],
                      "onUpdate:value": _cache[6] || (_cache[6] = ($event) => __props.optionData.differValue[1] = $event),
                      class: "input-num-width",
                      size: "small"
                    }, {
                      suffix: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(reactivity_esmBundler.unref(interact.DifferUnitObject)[__props.optionData.differUnit[1]]), 1)
                      ]),
                      _: 1
                    }, 8, ["value"])
                  ]),
                  _: 1
                })) : runtimeCore_esmBundler.createCommentVNode("", true),
                isRange.value ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(reactivity_esmBundler.unref(SettingItem.default), {
                  key: 1,
                  name: "结束值偏移单位"
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_select, {
                      value: __props.optionData.differUnit[1],
                      "onUpdate:value": _cache[7] || (_cache[7] = ($event) => __props.optionData.differUnit[1] = $event),
                      size: "small",
                      options: differUnitOptions
                    }, null, 8, ["value"])
                  ]),
                  _: 1
                })) : runtimeCore_esmBundler.createCommentVNode("", true)
              ]),
              _: 1
            })) : runtimeCore_esmBundler.createCommentVNode("", true)
          ]),
          _: 1
        })
      ], 64);
    };
  }
});
exports.default = _sfc_main;
