import { defineAsyncComponent as m, defineComponent as u, shallowRef as c, ref as _, createVNode as t, resolveComponent as i, isVNode as f } from "vue";
import { ElTabs as C, ElTabPane as v } from "element-plus";
import { useResolveVnode as y } from "@klweb/compose-app-engine";
import { j as r } from "./main-DXvReGBc.js";
const p = m({
  loader: () => import("./BasicsCompList-CVp3jwcp.js"),
  loadingComponent: r
}), g = m({
  loader: () => import("./BusinessCompList-DGiX_ABc.js"),
  loadingComponent: r
}), l = {
  "component-list-container": "_component-list-container_bpyp2_1",
  "component-list__content": "_component-list__content_bpyp2_13",
  "filter-text": "_filter-text_bpyp2_20",
  "comp-grid-container": "_comp-grid-container_bpyp2_27"
};
function j(o) {
  return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !f(o);
}
const x = /* @__PURE__ */ u({
  name: "KlEditorComponentPanel",
  components: {
    ElTabs: C,
    ElTabPane: v
  },
  setup() {
    const o = c(p), a = _("basics"), s = c([{
      label: "基础组件",
      name: "basics",
      component: p
    }, {
      label: "业务组件",
      name: "business",
      component: g
    }]), d = (n) => {
      const {
        paneName: e,
        index: b
      } = n;
      a.value = e, o.value = s.value[b].component;
    };
    return () => {
      let n;
      return t("section", {
        class: l["component-list-container"]
      }, [t(i("el-tabs"), {
        class: l["kl-editor-setter-tabs"],
        modelValue: a.value,
        "onUpdate:modelValue": (e) => a.value = e,
        onTabClick: (e) => d(e)
      }, j(n = s.value.map((e) => t(i("el-tab-pane"), {
        label: e.label,
        name: e.name
      }, null))) ? n : {
        default: () => [n]
      }), t("section", {
        class: l["component-list__content"]
      }, [o.value && y(o.value)])]);
    };
  }
}), S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: x
}, Symbol.toStringTag, { value: "Module" }));
export {
  l as C,
  S as i
};
