"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 index = require("./components/RequestGlobalConfig/index.vue2.js");
const index$1 = require("./components/RequestTargetConfig/index.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");
const plugin = require("../../../../../../../utils/plugin.js");
require("../../../../../../../components/GoLoading/index.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 _hoisted_1 = { class: "go-pr-3" };
const _hoisted_2 = { key: 1 };
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "pondIndex",
  props: {
    modelShow: Boolean,
    targetDataRequest: Object
  },
  emits: ["update:modelShow", "editSaveHandle"],
  setup(__props, { emit }) {
    const props = __props;
    reactivity_esmBundler.ref();
    const inputInstRef = reactivity_esmBundler.ref();
    const modelShowRef = reactivity_esmBundler.ref(false);
    runtimeCore_esmBundler.watch(() => props.modelShow, (newValue) => {
      modelShowRef.value = newValue;
    });
    const closeHandle = () => {
      emit("update:modelShow", false);
    };
    const closeAndSendHandle = () => {
      var _a, _b;
      if (!((_a = props.targetDataRequest) == null ? void 0 : _a.dataPondName)) {
        window.$message.warning("请在左下角输入名称！");
        (_b = inputInstRef.value) == null ? void 0 : _b.focus();
        return;
      }
      plugin.goDialog({
        message: "保存内容将同步修改所有使用此接口的组件, 是否继续?",
        isMaskClosable: true,
        transformOrigin: "center",
        onPositiveCallback: () => {
          emit("update:modelShow", false);
          emit("editSaveHandle", props.targetDataRequest);
        }
      });
    };
    return (_ctx, _cache) => {
      const _component_n_space = runtimeCore_esmBundler.resolveComponent("n-space");
      const _component_n_scrollbar = runtimeCore_esmBundler.resolveComponent("n-scrollbar");
      const _component_n_tag = runtimeCore_esmBundler.resolveComponent("n-tag");
      const _component_n_input = runtimeCore_esmBundler.resolveComponent("n-input");
      const _component_n_button = runtimeCore_esmBundler.resolveComponent("n-button");
      const _component_n_card = runtimeCore_esmBundler.resolveComponent("n-card");
      const _component_n_modal = runtimeCore_esmBundler.resolveComponent("n-modal");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_modal, {
        class: "go-chart-data-request",
        show: modelShowRef.value,
        "onUpdate:show": _cache[1] || (_cache[1] = ($event) => modelShowRef.value = $event),
        "mask-closable": false,
        closeOnEsc: false
      }, {
        default: runtimeCore_esmBundler.withCtx(() => [
          runtimeCore_esmBundler.createVNode(_component_n_card, {
            bordered: false,
            role: "dialog",
            size: "small",
            "aria-modal": "true",
            style: { "width": "1000px", "height": "800px" }
          }, {
            header: runtimeCore_esmBundler.withCtx(() => []),
            "header-extra": runtimeCore_esmBundler.withCtx(() => []),
            action: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_space, { justify: "space-between" }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  __props.targetDataRequest ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_space, { key: 0 }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(_component_n_tag, {
                        bordered: false,
                        type: "primary"
                      }, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createTextVNode("名称：")
                        ]),
                        _: 1
                      }),
                      runtimeCore_esmBundler.createVNode(_component_n_input, {
                        value: __props.targetDataRequest.dataPondName,
                        "onUpdate:value": _cache[0] || (_cache[0] = ($event) => __props.targetDataRequest.dataPondName = $event),
                        ref_key: "inputInstRef",
                        ref: inputInstRef,
                        type: "text",
                        size: "small",
                        autofocus: true,
                        clearable: true,
                        minlength: 1,
                        maxlength: 16,
                        placeholder: "请输入名称"
                      }, null, 8, ["value"])
                    ]),
                    _: 1
                  })) : (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("span", _hoisted_2)),
                  runtimeCore_esmBundler.createVNode(_component_n_space, null, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(_component_n_button, { onClick: closeHandle }, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createTextVNode("取消")
                        ]),
                        _: 1
                      }),
                      runtimeCore_esmBundler.createVNode(_component_n_button, {
                        type: "primary",
                        onClick: closeAndSendHandle
                      }, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createTextVNode("保存")
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_scrollbar, { style: { "max-height": "718px" } }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createElementVNode("div", _hoisted_1, [
                    runtimeCore_esmBundler.createVNode(_component_n_space, { vertical: "" }, {
                      default: runtimeCore_esmBundler.withCtx(() => {
                        var _a;
                        return [
                          runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index.default)),
                          runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index$1.default), {
                            "target-data-request": (_a = __props.targetDataRequest) == null ? void 0 : _a.dataPondRequestConfig
                          }, null, 8, ["target-data-request"])
                        ];
                      }),
                      _: 1
                    })
                  ])
                ]),
                _: 1
              })
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["show"]);
    };
  }
});
exports.default = _sfc_main;
