"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");
const httpEnum = require("../../../../../../../../../enums/httpEnum.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");
require("../../../../../../../../../store/modules/chartEditStore/chartEditStore.js");
require("../../../../../../../../../components/Pages/ChartItemSetting/StylesSetting.vue.js");
const displayTable_vue_vue_type_script_setup_true_lang = require("./displayTable.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 shared_esmBundler = require("../../../../../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.js");
const _hoisted_1 = { class: "go-chart-data-display" };
const _hoisted_2 = { class: "go-mr-3" };
const _hoisted_3 = { key: 0 };
const _hoisted_4 = { class: "go-mt-3" };
const _hoisted_5 = { key: 0 };
const _hoisted_6 = { key: 1 };
const _hoisted_7 = { key: 1 };
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    globalData: Object,
    targetData: Object
  },
  setup(__props) {
    const props = __props;
    const { HelpOutlineIcon, FlashIcon, PulseIcon } = icon.icon.ionicons5;
    const {
      requestUrl,
      requestInterval,
      requestHttpType,
      requestContentType,
      requestSQLContent,
      requestParams,
      requestParamsBodyType,
      requestIntervalUnit
    } = reactivity_esmBundler.toRefs(props.targetData.dataPondRequestConfig);
    [httpEnum.RequestParamsTypeEnum.HEADER];
    const requestContentTypeObj = {
      [httpEnum.RequestContentTypeEnum.DEFAULT]: "普通请求",
      [httpEnum.RequestContentTypeEnum.SQL]: "SQL 请求"
    };
    const tabValue = reactivity_esmBundler.ref(httpEnum.RequestParamsTypeEnum.PARAMS);
    return (_ctx, _cache) => {
      const _component_n_input = runtimeCore_esmBundler.resolveComponent("n-input");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_divider = runtimeCore_esmBundler.resolveComponent("n-divider");
      const _component_n_tab = runtimeCore_esmBundler.resolveComponent("n-tab");
      const _component_n_tabs = runtimeCore_esmBundler.resolveComponent("n-tabs");
      const _component_n_text = runtimeCore_esmBundler.resolveComponent("n-text");
      const _component_n_card = runtimeCore_esmBundler.resolveComponent("n-card");
      const _component_n_code = runtimeCore_esmBundler.resolveComponent("n-code");
      const _component_n_scrollbar = runtimeCore_esmBundler.resolveComponent("n-scrollbar");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", _hoisted_1, [
        runtimeCore_esmBundler.createVNode(_component_n_scrollbar, { style: { "max-height": "570px" } }, {
          default: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createElementVNode("div", _hoisted_2, [
              runtimeCore_esmBundler.createElementVNode("div", null, [
                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(() => {
                        var _a;
                        return [
                          runtimeCore_esmBundler.createVNode(_component_n_input, {
                            size: "small",
                            placeholder: ((_a = __props.targetData) == null ? void 0 : _a.dataPondName) || "暂无",
                            disabled: true
                          }, null, 8, ["placeholder"])
                        ];
                      }),
                      _: 1
                    }),
                    runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "接口类型" }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_input, {
                          size: "small",
                          placeholder: reactivity_esmBundler.unref(requestHttpType) || "暂无",
                          disabled: true
                        }, null, 8, ["placeholder"])
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), null, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "组件间隔" }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_input, {
                          size: "small",
                          placeholder: `${reactivity_esmBundler.unref(requestInterval) || "暂无"}`,
                          disabled: true
                        }, {
                          suffix: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(__props.targetData && reactivity_esmBundler.unref(httpEnum.SelectHttpTimeNameObj)[reactivity_esmBundler.unref(requestIntervalUnit)]), 1)
                          ]),
                          _: 1
                        }, 8, ["placeholder"])
                      ]),
                      _: 1
                    }),
                    runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItem.default), { name: "全局间隔（默认）" }, {
                      default: runtimeCore_esmBundler.withCtx(() => {
                        var _a;
                        return [
                          runtimeCore_esmBundler.createVNode(_component_n_input, {
                            size: "small",
                            placeholder: `${((_a = __props.globalData) == null ? void 0 : _a.requestInterval) || "暂无"}`,
                            disabled: true
                          }, {
                            suffix: runtimeCore_esmBundler.withCtx(() => [
                              runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(__props.globalData && reactivity_esmBundler.unref(httpEnum.SelectHttpTimeNameObj)[__props.globalData.requestIntervalUnit]), 1)
                            ]),
                            _: 1
                          }, 8, ["placeholder"])
                        ];
                      }),
                      _: 1
                    })
                  ]),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), {
                  name: "源地址",
                  alone: true
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => {
                    var _a;
                    return [
                      runtimeCore_esmBundler.createVNode(_component_n_input, {
                        size: "small",
                        placeholder: ((_a = __props.globalData) == null ? void 0 : _a.requestOriginUrl) || "暂无",
                        disabled: true
                      }, {
                        prefix: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createVNode(_component_n_icon, { component: reactivity_esmBundler.unref(PulseIcon) }, null, 8, ["component"])
                        ]),
                        _: 1
                      }, 8, ["placeholder"])
                    ];
                  }),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), {
                  name: "接口地址",
                  alone: true
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_input, {
                      size: "small",
                      placeholder: reactivity_esmBundler.unref(requestUrl) || "暂无",
                      disabled: true
                    }, {
                      prefix: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_icon, { component: reactivity_esmBundler.unref(FlashIcon) }, null, 8, ["component"])
                      ]),
                      _: 1
                    }, 8, ["placeholder"])
                  ]),
                  _: 1
                })
              ]),
              runtimeCore_esmBundler.createVNode(_component_n_divider),
              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_input, {
                        size: "small",
                        placeholder: __props.targetData && requestContentTypeObj[reactivity_esmBundler.unref(requestContentType)],
                        disabled: true
                      }, null, 8, ["placeholder"])
                    ]),
                    _: 1
                  }),
                  reactivity_esmBundler.unref(requestContentType) === reactivity_esmBundler.unref(httpEnum.RequestContentTypeEnum).DEFAULT ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(reactivity_esmBundler.unref(SettingItem.default), {
                    key: 0,
                    name: "body 类型"
                  }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(_component_n_input, {
                        size: "small",
                        placeholder: __props.targetData && reactivity_esmBundler.unref(requestParamsBodyType),
                        disabled: true
                      }, null, 8, ["placeholder"])
                    ]),
                    _: 1
                  })) : runtimeCore_esmBundler.createCommentVNode("", true)
                ]),
                _: 1
              }),
              reactivity_esmBundler.unref(requestContentType) === reactivity_esmBundler.unref(httpEnum.RequestContentTypeEnum).DEFAULT ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", _hoisted_3, [
                runtimeCore_esmBundler.createVNode(_component_n_tabs, {
                  type: "line",
                  animated: "",
                  value: tabValue.value,
                  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => tabValue.value = $event)
                }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    (runtimeCore_esmBundler.openBlock(true), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, runtimeCore_esmBundler.renderList(reactivity_esmBundler.unref(httpEnum.RequestParamsTypeEnum), (item) => {
                      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_tab, {
                        key: item,
                        name: item,
                        tab: item
                      }, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(item), 1)
                        ]),
                        _: 2
                      }, 1032, ["name", "tab"]);
                    }), 128))
                  ]),
                  _: 1
                }, 8, ["value"]),
                runtimeCore_esmBundler.createElementVNode("div", _hoisted_4, [
                  tabValue.value !== reactivity_esmBundler.unref(httpEnum.RequestParamsTypeEnum).BODY ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", _hoisted_5, [
                    runtimeCore_esmBundler.createVNode(displayTable_vue_vue_type_script_setup_true_lang.default, {
                      class: "go-my-3",
                      target: reactivity_esmBundler.unref(requestParams)[tabValue.value]
                    }, null, 8, ["target"])
                  ])) : (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", _hoisted_6, [
                    reactivity_esmBundler.unref(requestParamsBodyType) === reactivity_esmBundler.unref(httpEnum.RequestBodyEnum)["NONE"] ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_card, {
                      key: 0,
                      class: "go-mt-3 go-pb-3"
                    }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_text, { depth: "3" }, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode("该接口没有 Body 体")
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    })) : reactivity_esmBundler.unref(requestParamsBodyType) === reactivity_esmBundler.unref(httpEnum.RequestBodyEnum)["FORM_DATA"] || reactivity_esmBundler.unref(requestParamsBodyType) === reactivity_esmBundler.unref(httpEnum.RequestBodyEnum)["X_WWW_FORM_URLENCODED"] ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(displayTable_vue_vue_type_script_setup_true_lang.default, {
                      key: 1,
                      class: "go-my-3",
                      target: reactivity_esmBundler.unref(requestParams)[reactivity_esmBundler.unref(httpEnum.RequestParamsTypeEnum).BODY][reactivity_esmBundler.unref(requestParamsBodyType)]
                    }, null, 8, ["target"])) : reactivity_esmBundler.unref(requestParamsBodyType) === reactivity_esmBundler.unref(httpEnum.RequestBodyEnum)["JSON"] ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_card, {
                      key: 2,
                      size: "small",
                      style: { "padding-bottom": "7px" }
                    }, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createVNode(_component_n_code, {
                          code: reactivity_esmBundler.unref(requestParams)[reactivity_esmBundler.unref(httpEnum.RequestParamsTypeEnum).BODY][reactivity_esmBundler.unref(requestParamsBodyType)] || "暂无内容",
                          language: "json"
                        }, null, 8, ["code"])
                      ]),
                      _: 1
                    })) : reactivity_esmBundler.unref(requestParamsBodyType) === reactivity_esmBundler.unref(httpEnum.RequestBodyEnum)["XML"] ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_code, {
                      key: 3,
                      code: reactivity_esmBundler.unref(requestParams)[reactivity_esmBundler.unref(httpEnum.RequestParamsTypeEnum).BODY][reactivity_esmBundler.unref(requestParamsBodyType)] || "",
                      language: "html"
                    }, null, 8, ["code"])) : runtimeCore_esmBundler.createCommentVNode("", true)
                  ]))
                ])
              ])) : (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", _hoisted_7, [
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), { name: "键名" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_text, null, {
                      default: runtimeCore_esmBundler.withCtx(() => [
                        runtimeCore_esmBundler.createTextVNode("sql")
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }),
                runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(SettingItemBox.default), { name: "键值" }, {
                  default: runtimeCore_esmBundler.withCtx(() => [
                    runtimeCore_esmBundler.createVNode(_component_n_code, {
                      code: reactivity_esmBundler.unref(requestSQLContent).sql || "",
                      language: "sql"
                    }, null, 8, ["code"])
                  ]),
                  _: 1
                })
              ]))
            ])
          ]),
          _: 1
        })
      ]);
    };
  }
});
exports.default = _sfc_main;
