import { defineComponent as m, openBlock as f, createElementBlock as h, createElementVNode as e, normalizeClass as i, createVNode as a, unref as b, renderSlot as o } from "vue";
import { a as u } from "./index-CLv1CFWG.js";
import x from "./Icon.js";
import { _ as l } from "./Logo.vue_vue_type_script_setup_true_lang-OzVO8dG0.js";
const _ = {
  "data-test": "stash-app-topbar",
  class: "stash-app-topbar absolute left-0 top-0"
}, w = ["href"], v = { class: "flex items-center" }, g = { class: "ml-6" }, k = { class: "hidden pl-3 xl:block" }, C = /* @__PURE__ */ m({
  __name: "AppTopbar",
  props: {
    sidebarOpened: { type: Boolean, default: !1 },
    href: { default: "/" }
  },
  emits: ["toggle-sidebar"],
  setup(n, { emit: d }) {
    const t = n, p = d, c = u("screen and (min-width: 1321px)");
    return (s, r) => (f(), h("header", _, [
      e("div", {
        class: i(["fixed top-0 flex h-topbar w-sidebar items-center pl-3 xl:text-white", {
          "z-dialog text-white": t.sidebarOpened,
          "z-[401] text-ice-700": !t.sidebarOpened
        }])
      }, [
        e("button", {
          class: "xl:hidden",
          onClick: r[0] || (r[0] = ($) => p("toggle-sidebar"))
        }, [
          a(x, {
            name: "menu",
            class: "mr-3",
            "aria-label": "open sidebar navigation"
          })
        ]),
        e("a", {
          href: t.href,
          class: "flex items-center text-inherit"
        }, [
          a(l, {
            color: t.sidebarOpened ? "white" : "purple",
            variant: "brandmark",
            class: "transition-colors duration-500 md:hidden"
          }, null, 8, ["color"]),
          a(l, {
            color: t.sidebarOpened || b(c) ? "white" : "purple",
            class: "hidden md:block"
          }, null, 8, ["color"])
        ], 8, w)
      ], 2),
      e("div", {
        class: i([[s.$attrs.class], "fixed top-0 z-page flex h-topbar w-full flex-row-reverse items-center justify-between bg-white py-3 pl-sidebar pr-3 shadow-md"])
      }, [
        e("div", v, [
          o(s.$slots, "actions"),
          e("div", g, [
            o(s.$slots, "avatar")
          ])
        ]),
        e("div", k, [
          o(s.$slots, "text")
        ])
      ], 2)
    ]));
  }
});
export {
  C as default
};
//# sourceMappingURL=AppTopbar.js.map
