import { defineComponent as p, createBlock as u, openBlock as k, unref as t, withCtx as r, createVNode as o, renderSlot as d, createTextVNode as m } from "vue";
import { ScalarMenu as S, ScalarMenuSection as f, ScalarMenuWorkspacePicker as w, ScalarMenuLink as M, ScalarMenuResources as g, ScalarMenuSupport as v } from "@scalar/components";
import { ScalarIconGear as C } from "@scalar/icons";
const x = /* @__PURE__ */ p({
  __name: "SidebarMenu",
  props: {
    activeWorkspace: {},
    workspaces: {}
  },
  emits: ["create:workspace", "select:workspace", "navigate:to:settings"],
  setup(n, { emit: i }) {
    const a = i;
    return (c, e) => (k(), u(t(S), null, {
      products: r(() => [...e[2] || (e[2] = [])]),
      sections: r(({ close: l }) => [
        o(t(f), null, {
          default: r(() => [
            d(c.$slots, "sidebarMenuActions", {}, () => [
              o(t(w), {
                modelValue: n.activeWorkspace.id,
                workspaceOptions: n.workspaces,
                onCreateWorkspace: e[0] || (e[0] = (s) => a("create:workspace")),
                "onUpdate:modelValue": e[1] || (e[1] = (s) => a("select:workspace", s))
              }, null, 8, ["modelValue", "workspaceOptions"]),
              o(t(M), {
                is: "button",
                icon: t(C),
                onClick: () => {
                  l(), a("navigate:to:settings");
                }
              }, {
                default: r(() => [...e[3] || (e[3] = [
                  m(" Settings ", -1)
                ])]),
                _: 1
              }, 8, ["icon", "onClick"])
            ])
          ]),
          _: 2
        }, 1024),
        o(t(g)),
        o(t(v))
      ]),
      _: 3
    }));
  }
});
export {
  x as default
};
