import { shallowRef as S, defineComponent as i, renderSlot as p, computed as E, openBlock as c, createElementBlock as m, Fragment as _, renderList as C, createVNode as r, withCtx as a, unref as u, createBlock as b, resolveDynamicComponent as k, createTextVNode as v, toDisplayString as y } from "vue";
import { ElMenuItem as F, ElIcon as g, ElSubMenu as I } from "element-plus";
function D(l, n) {
  if (typeof Symbol < "u") {
    const e = { ...l };
    return Object.defineProperty(e, Symbol.iterator, {
      enumerable: !1,
      value() {
        let o = 0;
        return {
          next: () => ({
            value: n[o++],
            done: o > n.length
          })
        };
      }
    }), e;
  } else
    return Object.assign([...n], l);
}
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
function O(l) {
  const n = /* @__PURE__ */ Object.create(null);
  return (e) => n[e] || (n[e] = l(e));
}
const $ = /-(\w)/g, B = O((l) => l.replace($, (n, e) => e ? e.toUpperCase() : ""));
function N(l = {}) {
  const {
    inheritAttrs: n = !0
  } = l, e = S(), o = /* @__PURE__ */ i({
    setup(s, { slots: t }) {
      return () => {
        e.value = t.default;
      };
    }
  }), f = /* @__PURE__ */ i({
    inheritAttrs: n,
    setup(s, { attrs: t, slots: x }) {
      return () => {
        var w;
        if (!e.value && process.env.NODE_ENV !== "production")
          throw new Error("[VueUse] Failed to find the definition of reusable template");
        const d = (w = e.value) == null ? void 0 : w.call(e, { ...R(t), $slots: x });
        return n && (d == null ? void 0 : d.length) === 1 ? d[0] : d;
      };
    }
  });
  return D(
    { define: o, reuse: f },
    [o, f]
  );
}
function R(l) {
  const n = {};
  for (const e in l)
    n[B(e)] = l[e];
  return n;
}
const h = /* @__PURE__ */ i({
  name: "If",
  __name: "If",
  props: {
    when: {}
  },
  setup(l) {
    const n = (e) => e;
    return (e, o) => e.when ? p(e.$slots, "default", {
      key: 0,
      value: n(e.when)
    }) : p(e.$slots, "fallback", { key: 1 });
  }
}), T = /* @__PURE__ */ i({
  name: "For",
  inheritAttrs: !1,
  __name: "For",
  props: {
    echo: {},
    rowKey: {}
  },
  setup(l) {
    const n = l, e = E(() => n.echo);
    return (o, f) => (c(), m(
      _,
      null,
      [
        (c(!0), m(
          _,
          null,
          C(o.echo, (s, t) => p(o.$slots, "default", {
            key: o.rowKey,
            item: s,
            index: t
          })),
          128
          /* KEYED_FRAGMENT */
        )),
        r(h, {
          when: !e.value || !e.value.length || e.value.length === 0
        }, {
          default: a(() => [
            p(o.$slots, "fallback")
          ]),
          _: 3
          /* FORWARDED */
        }, 8, ["when"])
      ],
      64
      /* STABLE_FRAGMENT */
    ));
  }
}), j = /* @__PURE__ */ i({
  name: "FsSideBarItem",
  __name: "Item",
  props: {
    items: {}
  },
  setup(l) {
    const [n, e] = N();
    return (o, f) => (c(), m(_, null, [
      r(u(n), null, {
        default: a(({ list: s }) => [
          r(u(T), {
            echo: s,
            "row-key": "path"
          }, {
            default: a(({ item: t }) => [
              r(u(h), {
                when: t.children && t.children.length
              }, {
                fallback: a(() => [
                  r(u(F), {
                    class: "fast-start-menu-item",
                    index: t.path
                  }, {
                    default: a(() => [
                      r(u(h), {
                        when: t.icon
                      }, {
                        default: a(() => [
                          r(u(g), null, {
                            default: a(() => [
                              (c(), b(k(t.icon)))
                            ]),
                            _: 2
                          }, 1024)
                        ]),
                        _: 2
                      }, 1032, ["when"]),
                      v(" " + y(t.name), 1)
                    ]),
                    _: 2
                  }, 1032, ["index"])
                ]),
                default: a(() => [
                  r(u(I), {
                    class: "fast-start-menu-item-title",
                    index: t.path
                  }, {
                    title: a(() => [
                      r(u(h), {
                        when: t.icon
                      }, {
                        default: a(() => [
                          r(u(g), null, {
                            default: a(() => [
                              (c(), b(k(t.icon)))
                            ]),
                            _: 2
                          }, 1024)
                        ]),
                        _: 2
                      }, 1032, ["when"]),
                      v(" " + y(t.name), 1)
                    ]),
                    default: a(() => [
                      r(u(e), {
                        list: t.children || []
                      }, null, 8, ["list"])
                    ]),
                    _: 2
                  }, 1032, ["index"])
                ]),
                _: 2
              }, 1032, ["when"])
            ]),
            _: 2
          }, 1032, ["echo"])
        ]),
        _: 1
      }),
      r(u(e), { list: o.items }, null, 8, ["list"])
    ], 64));
  }
});
export {
  j as default
};
//# sourceMappingURL=Item.mjs.map
