import { n as cn } from "./utils-DXzSsU1e.js";
import { createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, unref, withCtx } from "vue";
import { reactiveOmit } from "@vueuse/core";
import { DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, useForwardPropsEmits } from "reka-ui";
import { X } from "@lucide/vue";
import { cva } from "class-variance-authority";
//#endregion
//#region src/components/ui/sheet/Sheet.vue
var Sheet_default = /* @__PURE__ */ defineComponent({
	__name: "Sheet",
	props: {
		open: { type: Boolean },
		defaultOpen: { type: Boolean },
		modal: { type: Boolean }
	},
	emits: ["update:open"],
	setup(__props, { emit: __emit }) {
		const forwarded = useForwardPropsEmits(__props, __emit);
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogRoot), normalizeProps(guardReactiveProps(unref(forwarded))), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetClose.vue
var SheetClose_default = /* @__PURE__ */ defineComponent({
	__name: "SheetClose",
	props: {
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogClose), normalizeProps(guardReactiveProps(props)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetOverlay.vue
var SheetOverlay_default = /* @__PURE__ */ defineComponent({
	__name: "SheetOverlay",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		forceMount: { type: Boolean },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const delegatedProps = reactiveOmit(props, "class");
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogOverlay), mergeProps(unref(delegatedProps), { class: unref(cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", props.class) }), null, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetPortal.vue
var SheetPortal_default = /* @__PURE__ */ defineComponent({
	__name: "SheetPortal",
	props: {
		to: {},
		disabled: { type: Boolean },
		defer: { type: Boolean },
		forceMount: { type: Boolean }
	},
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogPortal), normalizeProps(guardReactiveProps(props)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetContent.vue
var SheetContent_default = /* @__PURE__ */ defineComponent({
	inheritAttrs: false,
	__name: "SheetContent",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		side: {},
		forceMount: { type: Boolean },
		disableOutsidePointerEvents: { type: Boolean },
		asChild: { type: Boolean },
		as: {}
	},
	emits: [
		"escapeKeyDown",
		"pointerDownOutside",
		"focusOutside",
		"interactOutside",
		"openAutoFocus",
		"closeAutoFocus"
	],
	setup(__props, { emit: __emit }) {
		const props = __props;
		const emits = __emit;
		const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "side"), emits);
		return (_ctx, _cache) => {
			return openBlock(), createBlock(SheetPortal_default, null, {
				default: withCtx(() => [createVNode(SheetOverlay_default), createVNode(unref(DialogContent), mergeProps({ class: unref(cn)(unref(sheetVariants)({ side: __props.side }), props.class) }, {
					...unref(forwarded),
					..._ctx.$attrs
				}), {
					default: withCtx(() => [renderSlot(_ctx.$slots, "default"), createVNode(unref(DialogClose), { class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary" }, {
						default: withCtx(() => [createVNode(unref(X), { class: "h-4 w-4 text-muted-foreground" }), _cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "Close", -1))]),
						_: 1
					})]),
					_: 3
				}, 16, ["class"])]),
				_: 3
			});
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetDescription.vue
var SheetDescription_default = /* @__PURE__ */ defineComponent({
	__name: "SheetDescription",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const delegatedProps = reactiveOmit(props, "class");
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogDescription), mergeProps({ class: unref(cn)("text-sm text-muted-foreground", props.class) }, unref(delegatedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetFooter.vue
var SheetFooter_default = /* @__PURE__ */ defineComponent({
	__name: "SheetFooter",
	props: { class: { type: [
		Boolean,
		null,
		String,
		Object,
		Array
	] } },
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2", props.class)) }, [renderSlot(_ctx.$slots, "default")], 2);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetHeader.vue
var SheetHeader_default = /* @__PURE__ */ defineComponent({
	__name: "SheetHeader",
	props: { class: { type: [
		Boolean,
		null,
		String,
		Object,
		Array
	] } },
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("flex flex-col gap-y-2 text-center sm:text-left", props.class)) }, [renderSlot(_ctx.$slots, "default")], 2);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetTitle.vue
var SheetTitle_default = /* @__PURE__ */ defineComponent({
	__name: "SheetTitle",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const delegatedProps = reactiveOmit(props, "class");
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogTitle), mergeProps({ class: unref(cn)("text-lg font-semibold text-foreground", props.class) }, unref(delegatedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/SheetTrigger.vue
var SheetTrigger_default = /* @__PURE__ */ defineComponent({
	__name: "SheetTrigger",
	props: {
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(DialogTrigger), normalizeProps(guardReactiveProps(props)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/ui/sheet/index.ts
var sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
	variants: { side: {
		top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
		bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
		left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
		right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
	} },
	defaultVariants: { side: "right" }
});
//#endregion
export { SheetFooter_default as a, SheetPortal_default as c, Sheet_default as d, SheetHeader_default as i, SheetOverlay_default as l, SheetTrigger_default as n, SheetDescription_default as o, SheetTitle_default as r, SheetContent_default as s, sheetVariants as t, SheetClose_default as u };

//# sourceMappingURL=sheet-BUh3-iGH.js.map