"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 designStore = require("../../../../../../../../../store/modules/designStore/designStore.js");
const SettingItem = require("../../../../../../../../../components/Pages/ChartItemSetting/SettingItem.vue2.js");
const SettingItemBox = require("../../../../../../../../../components/Pages/ChartItemSetting/SettingItemBox.vue.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("../../../../../../../../../settings/designSetting.js");
require("../../../../../../../../../components/GoLoading/index.js");
require("../../../../../../../../../components/GoSkeleton/index.vue.js");
const icon = require("../../../../../../../../../plugins/icon.js");
require("../../../../../../../../../store/modules/chartEditStore/chartEditStore.js");
require("../../../../../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.js");
const useTargetData_hook = require("../../../../../hooks/useTargetData.hook.js");
const index_d = require("../../../../index.d.js");
const index_vue_vue_type_script_setup_true_lang = require("../RequestGlobalHeaderTable/index.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 runtimeDom_esmBundler = require("../../../../../../../../../../node_modules/.pnpm/@vue_runtime-dom@3.3.4/node_modules/@vue/runtime-dom/dist/runtime-dom.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: "index",
  setup(__props) {
    runtimeDom_esmBundler.useCssVars((_ctx) => ({
      "17e515f4": themeColor.value
    }));
    const { PencilIcon, ChevronDownOutlineIcon, ChevronUpOutlineIcon } = icon.icon.ionicons5;
    const { chartEditStore } = useTargetData_hook.useTargetData();
    const { requestOriginUrl, requestInterval, requestIntervalUnit } = reactivity_esmBundler.toRefs(chartEditStore.getRequestGlobalConfig);
    const editDisabled = reactivity_esmBundler.ref(true);
    const designStore$1 = designStore.useDesignStore();
    const showTable = reactivity_esmBundler.ref(false);
    const themeColor = runtimeCore_esmBundler.computed(() => {
      return designStore$1.getAppTheme;
    });
    return (_ctx, _cache) => {
      const _component_n_tag = runtimeCore_esmBundler.resolveComponent("n-tag");
      const _component_n_input = runtimeCore_esmBundler.resolveComponent("n-input");
      const _component_n_input_number = runtimeCore_esmBundler.resolveComponent("n-input-number");
      const _component_n_select = runtimeCore_esmBundler.resolveComponent("n-select");
      const _component_n_input_group = runtimeCore_esmBundler.resolveComponent("n-input-group");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_button = runtimeCore_esmBundler.resolveComponent("n-button");
      const _component_n_collapse_transition = runtimeCore_esmBundler.resolveComponent("n-collapse-transition");
      const _component_n_tooltip = runtimeCore_esmBundler.resolveComponent("n-tooltip");
      const _component_n_card = runtimeCore_esmBundler.resolveComponent("n-card");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_card, { class: "n-card-shallow" }, {
        default: runtimeCore_esmBundler.withCtx(() => [
          runtimeCore_esmBundler.createVNode(_component_n_tag, {
            type: "info",
            bordered: false,
            style: { "border-radius": "5px" }
          }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createTextVNode(" 全局公共配置 ")
            ]),
            _: 1
          }),
          runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), {
            name: "服务",
            itemRightStyle: {
              gridTemplateColumns: "5fr 2fr 1fr"
            }
          }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "前置 URL" }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_input, {
                    value: reactivity_esmBundler.unref(requestOriginUrl),
                    "onUpdate:value": _cache[0] || (_cache[0] = ($event) => reactivity_esmBundler.isRef(requestOriginUrl) ? requestOriginUrl.value = $event : null),
                    valueModifiers: { trim: true },
                    disabled: editDisabled.value,
                    placeholder: "例：http://127.0.0.1/"
                  }, null, 8, ["value", "disabled"])
                ]),
                _: 1
              }),
              runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "更新间隔，为 0 只会初始化" }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_input_group, null, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(_component_n_input_number, {
                        class: "select-time-number",
                        value: reactivity_esmBundler.unref(requestInterval),
                        "onUpdate:value": _cache[1] || (_cache[1] = ($event) => reactivity_esmBundler.isRef(requestInterval) ? requestInterval.value = $event : null),
                        valueModifiers: { trim: true },
                        min: "0",
                        "show-button": false,
                        disabled: editDisabled.value,
                        placeholder: "请输入数字"
                      }, null, 8, ["value", "disabled"]),
                      runtimeCore_esmBundler.createVNode(_component_n_select, {
                        class: "select-time-options",
                        value: reactivity_esmBundler.unref(requestIntervalUnit),
                        "onUpdate:value": _cache[2] || (_cache[2] = ($event) => reactivity_esmBundler.isRef(requestIntervalUnit) ? requestIntervalUnit.value = $event : null),
                        options: reactivity_esmBundler.unref(index_d.selectTimeOptions),
                        disabled: editDisabled.value
                      }, null, 8, ["value", "options", "disabled"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }),
              runtimeCore_esmBundler.withDirectives(runtimeCore_esmBundler.createVNode(_component_n_button, {
                type: "primary",
                ghost: "",
                onClick: _cache[3] || (_cache[3] = ($event) => editDisabled.value = false)
              }, {
                icon: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_icon, null, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(PencilIcon))
                    ]),
                    _: 1
                  })
                ]),
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createTextVNode(" 编辑配置 ")
                ]),
                _: 1
              }, 512), [
                [runtimeDom_esmBundler.vShow, editDisabled.value]
              ])
            ]),
            _: 1
          }),
          runtimeCore_esmBundler.createVNode(_component_n_collapse_transition, { show: showTable.value }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index_vue_vue_type_script_setup_true_lang.default), { editDisabled: editDisabled.value }, null, 8, ["editDisabled"])
            ]),
            _: 1
          }, 8, ["show"]),
          showTable.value ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", {
            key: 0,
            class: "go-flex-center go-mt-3 down",
            onClick: _cache[4] || (_cache[4] = ($event) => showTable.value = false)
          }, [
            runtimeCore_esmBundler.createVNode(_component_n_icon, { size: "32" }, {
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(ChevronUpOutlineIcon))
              ]),
              _: 1
            })
          ])) : (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", {
            key: 1,
            class: "go-flex-center go-mt-3 down",
            onClick: _cache[5] || (_cache[5] = ($event) => showTable.value = true)
          }, [
            runtimeCore_esmBundler.createVNode(_component_n_tooltip, {
              trigger: "hover",
              placement: "top",
              "keep-alive-on-hover": false
            }, {
              trigger: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createVNode(_component_n_icon, { size: "32" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(ChevronDownOutlineIcon))
                  ]),
                  _: 1
                })
              ]),
              default: runtimeCore_esmBundler.withCtx(() => [
                runtimeCore_esmBundler.createTextVNode(" 展开 ")
              ]),
              _: 1
            })
          ]))
        ]),
        _: 1
      });
    };
  }
});
exports.default = _sfc_main;
