import { useLayout } from "../../hooks/useLayout.js";
import { createBlock, createCommentVNode, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
import { ScalarButton, ScalarHotkey } from "@scalar/components";
//#region src/components/Sidebar/SidebarButton.vue?vue&type=script&setup=true&lang.ts
var SidebarButton_vue_vue_type_script_setup_true_lang_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_vue_vue_type_script_setup_true_lang_default as default };

//# sourceMappingURL=SidebarButton.vue.script.js.map