"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 useTargetData_hook = require("../../../../../hooks/useTargetData.hook.js");
const designStore = require("../../../../../../../../../store/modules/designStore/designStore.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");
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 shared_esmBundler = require("../../../../../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.js");
const _withScopeId = (n) => (runtimeCore_esmBundler.pushScopeId("data-v-43dfb7fe"), n = n(), runtimeCore_esmBundler.popScopeId(), n);
const _hoisted_1 = { class: "go-chart-data-pond-list" };
const _hoisted_2 = { class: "pond-item-box" };
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ runtimeCore_esmBundler.createElementVNode("span", null, " 创建 ", -1));
const _hoisted_4 = ["onClick"];
const _hoisted_5 = { class: "item-content" };
const _hoisted_6 = { class: "item-content-body" };
const _hoisted_7 = ["onClick"];
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  emits: ["createPond", "deletePond"],
  setup(__props, { emit }) {
    runtimeDom_esmBundler.useCssVars((_ctx) => ({
      "1013e1a5": themeColor.value
    }));
    const { DuplicateOutlineIcon, TrashIcon } = icon.icon.ionicons5;
    const designStore$1 = designStore.useDesignStore();
    const { chartEditStore, targetData } = useTargetData_hook.useTargetData();
    const { requestDataPond } = reactivity_esmBundler.toRefs(chartEditStore.getRequestGlobalConfig);
    const selectPondId = runtimeCore_esmBundler.computed(() => {
      return targetData.value.request.requestDataPondId;
    });
    const themeColor = runtimeCore_esmBundler.computed(() => {
      return designStore$1.getAppTheme;
    });
    const createPond = () => {
      emit("createPond", true);
    };
    const deletePond = (target, targetData2) => {
      target.stopPropagation();
      target.preventDefault();
      emit("deletePond", targetData2);
    };
    const clickHandle = (item) => {
      targetData.value.request.requestDataPondId = item.dataPondId;
    };
    return (_ctx, _cache) => {
      const _component_n_timeline_item = runtimeCore_esmBundler.resolveComponent("n-timeline-item");
      const _component_n_timeline = runtimeCore_esmBundler.resolveComponent("n-timeline");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_button = runtimeCore_esmBundler.resolveComponent("n-button");
      const _component_n_divider = runtimeCore_esmBundler.resolveComponent("n-divider");
      const _component_n_a = runtimeCore_esmBundler.resolveComponent("n-a");
      const _component_n_text = runtimeCore_esmBundler.resolveComponent("n-text");
      const _component_n_space = runtimeCore_esmBundler.resolveComponent("n-space");
      const _component_n_tag = runtimeCore_esmBundler.resolveComponent("n-tag");
      const _component_n_ellipsis = runtimeCore_esmBundler.resolveComponent("n-ellipsis");
      const _component_n_scrollbar = runtimeCore_esmBundler.resolveComponent("n-scrollbar");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", _hoisted_1, [
        runtimeCore_esmBundler.createVNode(_component_n_timeline, {
          class: "pond-item-timeline",
          style: { "width": "20px" }
        }, {
          default: runtimeCore_esmBundler.withCtx(() => [
            runtimeCore_esmBundler.createVNode(_component_n_timeline_item, { type: "info" }),
            runtimeCore_esmBundler.createVNode(_component_n_timeline_item, { type: "success" })
          ]),
          _: 1
        }),
        runtimeCore_esmBundler.createElementVNode("div", _hoisted_2, [
          runtimeCore_esmBundler.createVNode(_component_n_button, {
            class: "create-btn go-py-4",
            ghost: "",
            onClick: createPond
          }, {
            icon: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_icon, null, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(DuplicateOutlineIcon))
                ]),
                _: 1
              })
            ]),
            default: runtimeCore_esmBundler.withCtx(() => [
              _hoisted_3
            ]),
            _: 1
          }),
          runtimeCore_esmBundler.createVNode(_component_n_divider, { style: { "margin": "10px 0" } }),
          !reactivity_esmBundler.unref(requestDataPond).length ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_space, {
            key: 0,
            justify: "center"
          }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_text, {
                class: "not-layer-text",
                depth: 3
              }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createTextVNode(" 暂无数据内容， "),
                  runtimeCore_esmBundler.createVNode(_component_n_a, { onClick: createPond }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createTextVNode("立即创建")
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            _: 1
          })) : runtimeCore_esmBundler.createCommentVNode("", true),
          runtimeCore_esmBundler.createVNode(_component_n_scrollbar, { style: { "max-height": "490px" } }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              (runtimeCore_esmBundler.openBlock(true), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, runtimeCore_esmBundler.renderList(reactivity_esmBundler.unref(requestDataPond), (item) => {
                return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createElementBlock("div", {
                  key: item.dataPondId,
                  class: shared_esmBundler.normalizeClass([{ select: item.dataPondId === selectPondId.value }, "pond-item"]),
                  onClick: ($event) => clickHandle(item)
                }, [
                  runtimeCore_esmBundler.createElementVNode("div", _hoisted_5, [
                    runtimeCore_esmBundler.createElementVNode("div", _hoisted_6, [
                      runtimeCore_esmBundler.createElementVNode("div", null, [
                        runtimeCore_esmBundler.createVNode(_component_n_tag, {
                          class: "go-mr-1",
                          type: item.dataPondId === selectPondId.value ? "warning" : "",
                          bordered: false
                        }, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode(" 名称 ")
                          ]),
                          _: 2
                        }, 1032, ["type"]),
                        runtimeCore_esmBundler.createVNode(_component_n_ellipsis, { style: { "max-width": "180px" } }, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(item.dataPondName || "暂无"), 1)
                          ]),
                          _: 2
                        }, 1024)
                      ]),
                      runtimeCore_esmBundler.createElementVNode("div", null, [
                        runtimeCore_esmBundler.createVNode(_component_n_tag, {
                          class: "go-mr-1",
                          type: item.dataPondId === selectPondId.value ? "warning" : "",
                          bordered: false
                        }, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode(" 地址 ")
                          ]),
                          _: 2
                        }, 1032, ["type"]),
                        runtimeCore_esmBundler.createVNode(_component_n_ellipsis, { style: { "max-width": "180px" } }, {
                          default: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createTextVNode(shared_esmBundler.toDisplayString(item.dataPondRequestConfig.requestUrl || "暂无"), 1)
                          ]),
                          _: 2
                        }, 1024)
                      ])
                    ]),
                    runtimeCore_esmBundler.createElementVNode("div", {
                      class: "item-content-icon go-transition-quick",
                      onClick: ($event) => deletePond($event, item)
                    }, [
                      runtimeCore_esmBundler.createVNode(_component_n_icon, null, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(TrashIcon))
                        ]),
                        _: 1
                      })
                    ], 8, _hoisted_7)
                  ]),
                  runtimeCore_esmBundler.createElementVNode("div", {
                    class: shared_esmBundler.normalizeClass({ "select-modal": item.dataPondId === selectPondId.value })
                  }, null, 2)
                ], 10, _hoisted_4);
              }), 128))
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
});
exports.default = _sfc_main;
