import { defineAsyncComponent as t, defineComponent as b, KeepAlive as f, shallowRef as c, ref as C, createVNode as n, resolveComponent as m, isVNode as S } from "vue";
import { ElTabs as g, ElTabPane as k } from "element-plus";
import { useResolveVnode as y } from "@klweb/compose-app-engine";
import { j as l, k as d } from "./main-DXvReGBc.js";
const s = t({
  loader: () => import("./index-o_r-2_15.js"),
  loadingComponent: l
}), _ = t({
  loader: () => import("./index---7rTxR1.js"),
  loadingComponent: l
}), j = t({
  loader: () => import("./index-B4nlfk-n.js"),
  loadingComponent: l
}), N = t({
  loader: () => import("./index-Dne96l6h.js").then((e) => e.i),
  loadingComponent: l
}), O = t({
  loader: () => import("./index-C3c5uRrG.js")
}), h = t({
  loader: () => import("./index-B5mlA2Y6.js"),
  loadingComponent: l
}), D = t({
  loader: () => import("./index-BZr_l2dc.js")
});
function u(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !S(e);
}
const V = /* @__PURE__ */ b({
  name: "KlEditorSetter",
  components: {
    ElTabs: g,
    ElTabPane: k,
    KeepAlive: f,
    CompLoading: l
  },
  setup() {
    const e = c(s), p = C("prop"), i = c([{
      label: "属性",
      name: "prop",
      component: s
    }, {
      label: "样式",
      name: "style",
      component: _
    }, {
      label: "事件",
      name: "event",
      component: j
    }, {
      label: "数据",
      name: "ds",
      component: N
    }]), v = (a) => {
      const {
        paneName: r,
        index: o
      } = a;
      p.value = r, e.value = i.value[o].component;
    };
    return () => {
      let a, r;
      return n("div", {
        class: "kl-editor-setter"
      }, [n(m("el-tabs"), {
        modelValue: p.value,
        "onUpdate:modelValue": (o) => p.value = o,
        onTabClick: (o) => v(o)
      }, u(a = i.value.map((o) => n(m("el-tab-pane"), {
        label: o.label,
        name: o.name
      }, null))) ? a : {
        default: () => [a]
      }), n("main", null, [d.value && e.value ? n(m("keep-alive"), null, u(r = y(e.value, {
        // 传递当前组件 `compId`
        compId: d.value
      })) ? r : {
        default: () => [r]
      }) : n(m("comp-loading"), null, null)])]);
    };
  }
}), A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: V
}, Symbol.toStringTag, { value: "Module" }));
export {
  D as C,
  h as D,
  O as N,
  A as i
};
