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