import { a as useLayout } from "./useSidebar-DLTwHDI-.js";
import { createBlock, createCommentVNode, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
import { ScalarButton, ScalarHotkey } from "@scalar/components";
//#endregion
//#region src/components/Sidebar/SidebarButton.vue
var SidebarButton_default = /* @__PURE__ */ defineComponent({
	__name: "SidebarButton",
	props: {
		click: { type: Function },
		hotkey: {}
	},
	setup(__props) {
		const props = __props;
		const { layout } = useLayout();
		const handleClick = () => {
			props.click();
		};
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(ScalarButton), {
				class: "bg-b-1 text-c-1 hover:bg-b-2 group relative h-auto w-auto border px-2 py-1 md:w-full md:p-1.5",
				variant: "outlined",
				onClick: handleClick
			}, {
				default: withCtx(() => [renderSlot(_ctx.$slots, "title"), __props.hotkey && unref(layout) === "desktop" ? (openBlock(), createBlock(unref(ScalarHotkey), {
					key: 0,
					class: "text-c-2 add-item-hotkey absolute right-2 hidden group-hover:opacity-80 md:flex",
					hotkey: __props.hotkey
				}, null, 8, ["hotkey"])) : createCommentVNode("", true)]),
				_: 3
			});
		};
	}
});
//#endregion
export { SidebarButton_default as t };

//# sourceMappingURL=SidebarButton-BAagdMDe.js.map