import { ref as a, shallowRef as m, defineComponent as h, KeepAlive as C, createVNode as l, Fragment as E, resolveComponent as n, isVNode as b } from "vue";
import { ElIcon as I, ElTooltip as N } from "element-plus";
import { useResolveVnode as p } from "@klweb/compose-app-engine";
import { E as j, a as P, b as g, c as O, A as s } from "./main-Blxobku2.js";
import { e as S } from "./index-BbdVezoQ.js";
const {
  IconPage: k,
  IconComponent: x,
  IconOutline: T,
  IconSchema: F,
  IconPlugin: A,
  IconSetting: D,
  IconClose: w,
  IconPushpinOutlined: y,
  IconPushpinTwotone: L
} = S, i = a(""), d = a(""), u = m(), M = m([
  {
    label: "页面",
    value: "page",
    icon: k,
    panelName: "应用页面",
    panelComp: j
  },
  {
    label: "组件",
    value: "component",
    icon: x,
    panelName: "组件库",
    panelComp: P
  },
  {
    label: "大纲",
    value: "outline",
    icon: T,
    panelName: "大纲树",
    panelComp: g
  },
  {
    label: "Schema",
    value: "schema",
    icon: F,
    panelName: "Schema",
    panelComp: O
  },
  {
    label: "插件",
    value: "plugin",
    icon: A,
    panelName: "应用插件"
    // panelComp: IconComponent
  },
  {
    label: "配置",
    value: "setting",
    icon: D,
    panelName: "应用配置"
    // panelComp: IconComponent
  }
]);
function V(e) {
  i.value = e.value, d.value = e.panelName, u.value = e.panelComp, f.value = e.value === "schema", _(!1);
}
const f = a(!1), v = a(!0);
function _(e) {
  v.value = e, i.value = e ? "" : i.value;
}
const t = a(!1);
function r(e) {
  t.value = e;
}
const X = "_identifier_ihj9n_1", o = {
  "toolbar-tabs-container": "_toolbar-tabs-container_ihj9n_1",
  identifier: X,
  "toolbar-panel-container": "_toolbar-panel-container_ihj9n_50",
  "panel-title": "_panel-title_ihj9n_59",
  "panel-component": "_panel-component_ihj9n_80",
  "is-schema": "_is-schema_ihj9n_85",
  "is-closed": "_is-closed_ihj9n_88",
  "is-fixed": "_is-fixed_ihj9n_91"
};
function K(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !b(e);
}
const H = /* @__PURE__ */ h({
  name: "KlEditorAsideToolbar",
  components: {
    KeepAlive: C,
    ElIcon: I,
    ElTooltip: N,
    IconClose: w,
    IconPushpinOutlined: y,
    IconPushpinTwotone: L
  },
  setup() {
    return () => l(E, null, [l("ul", {
      class: o["toolbar-tabs-container"]
    }, [M.value.map((e) => {
      let c;
      return l("li", {
        class: e.value === i.value ? "active" : "",
        onClick: () => V(e),
        key: e.value
      }, [l(n("el-icon"), null, K(c = p(e.icon)) ? c : {
        default: () => [c]
      }), l("span", null, [e.label])]);
    })]), l("div", {
      class: [o["toolbar-panel-container"], f.value ? o["is-schema"] : "", v.value ? o["is-closed"] : "", t.value ? o["is-fixed"] : ""]
    }, [l("section", {
      class: o["panel-title"]
    }, [l("strong", null, [d.value]), l("span", null, [l(n("el-tooltip"), {
      effect: "dark",
      placement: "top",
      "hide-after": 0,
      content: t.value ? s.CLOSE_FIXED_MODE : s.OPEN_FIXED_MODE
    }, {
      default: () => [t.value ? l(n("el-icon"), {
        onClick: () => r(!1)
      }, {
        default: () => [l(n("icon-pushpin-twotone"), null, null)]
      }) : l(n("el-icon"), {
        onClick: () => r(!0)
      }, {
        default: () => [l(n("icon-pushpin-outlined"), null, null)]
      })]
    }), l(n("el-tooltip"), {
      effect: "dark",
      placement: "top",
      "hide-after": 0,
      content: s.CLOSE_FIXED_PANEL
    }, {
      default: () => [l(n("el-icon"), {
        onClick: () => _(!0)
      }, {
        default: () => [l(n("icon-close"), null, null)]
      })]
    })])]), l("section", {
      class: o["panel-component"]
    }, [l(n("keep-alive"), {
      include: "null"
    }, {
      default: () => [u.value && p(u.value)]
    })])])]);
  }
});
export {
  H as default
};
