import { defineComponent as g, useSlots as S, computed as k, createBlock as c, openBlock as r, createSlots as y, withCtx as a, createVNode as C, createElementBlock as h, createCommentVNode as i, renderSlot as d, unref as p, renderList as v, normalizeProps as w, guardReactiveProps as $ } from "vue";
import { ScalarColorModeToggleIcon as B } from "@scalar/components";
import D from "../ApiReferenceLayout.vue.js";
import H from "../ClassicHeader.vue.js";
import M from "../../features/Search/SearchButton.vue.js";
const K = {
  key: 0,
  class: "w-64"
}, T = /* @__PURE__ */ g({
  __name: "ClassicLayout",
  props: {
    configuration: {},
    parsedSpec: {},
    rawSpec: {},
    isDark: { type: Boolean }
  },
  emits: ["toggleDarkMode", "updateContent"],
  setup(u) {
    const n = u, m = S(), l = k(() => ({ ...n.configuration, showSidebar: !1 }));
    return (e, o) => (r(), c(D, {
      configuration: l.value,
      parsedSpec: e.parsedSpec,
      rawSpec: e.rawSpec,
      onUpdateContent: o[1] || (o[1] = (t) => e.$emit("updateContent", t))
    }, y({
      "content-start": a(({ spec: t }) => [
        C(H, null, {
          "dark-mode-toggle": a(() => [
            n.configuration.hideDarkModeToggle ? i("", !0) : (r(), c(p(B), {
              key: 0,
              class: "text-c-2 hover:text-c-1",
              mode: e.isDark ? "dark" : "light",
              style: { transform: "scale(1.4)" },
              variant: "icon",
              onClick: o[0] || (o[0] = (s) => e.$emit("toggleDarkMode"))
            }, null, 8, ["mode"]))
          ]),
          default: a(() => [
            e.$slots["document-selector"] ? (r(), h("div", K, [
              d(e.$slots, "document-selector")
            ])) : i("", !0),
            n.configuration.hideSearch ? i("", !0) : (r(), c(p(M), {
              key: 1,
              class: "t-doc__sidebar",
              searchHotKey: l.value.searchHotKey,
              spec: t
            }, null, 8, ["searchHotKey", "spec"]))
          ]),
          _: 2
        }, 1024)
      ]),
      _: 2
    }, [
      v(m, (t, s) => ({
        name: s,
        fn: a((f) => [
          d(e.$slots, s, w($(f || {})))
        ])
      }))
    ]), 1032, ["configuration", "parsedSpec", "rawSpec"]));
  }
});
export {
  T as default
};
