"use client";
import { cn } from "../../lib/utils.js";
import { c } from "react/compiler-runtime";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { XIcon } from "lucide-react";
import * as SheetPrimitive from "@radix-ui/react-dialog";
function Sheet(e) {
	let i = c(4), a;
	i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
	let s;
	return i[2] === a ? s = i[3] : (s = /* @__PURE__ */ jsx(SheetPrimitive.Root, {
		"data-slot": "sheet",
		...a
	}), i[2] = a, i[3] = s), s;
}
function SheetTrigger(e) {
	let i = c(4), a;
	i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
	let s;
	return i[2] === a ? s = i[3] : (s = /* @__PURE__ */ jsx(SheetPrimitive.Trigger, {
		"data-slot": "sheet-trigger",
		...a
	}), i[2] = a, i[3] = s), s;
}
function SheetClose(e) {
	let i = c(4), a;
	i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
	let s;
	return i[2] === a ? s = i[3] : (s = /* @__PURE__ */ jsx(SheetPrimitive.Close, {
		"data-slot": "sheet-close",
		...a
	}), i[2] = a, i[3] = s), s;
}
function SheetPortal(e) {
	let i = c(4), a;
	i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
	let s;
	return i[2] === a ? s = i[3] : (s = /* @__PURE__ */ jsx(SheetPrimitive.Portal, {
		"data-slot": "sheet-portal",
		...a
	}), i[2] = a, i[3] = s), s;
}
function SheetOverlay(i) {
	let a = c(8), s, l;
	a[0] === i ? (s = a[1], l = a[2]) : ({className: s, ...l} = i, a[0] = i, a[1] = s, a[2] = l);
	let u;
	a[3] === s ? u = a[4] : (u = cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", s), a[3] = s, a[4] = u);
	let d;
	return a[5] !== l || a[6] !== u ? (d = /* @__PURE__ */ jsx(SheetPrimitive.Overlay, {
		"data-slot": "sheet-overlay",
		className: u,
		...l
	}), a[5] = l, a[6] = u, a[7] = d) : d = a[7], d;
}
function SheetContent(s) {
	let l = c(17), u, f, p, m;
	l[0] === s ? (u = l[1], f = l[2], p = l[3], m = l[4]) : ({className: f, children: u, side: m, ...p} = s, l[0] = s, l[1] = u, l[2] = f, l[3] = p, l[4] = m);
	let h = m === void 0 ? "right" : m, g;
	l[5] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(SheetOverlay, {}), l[5] = g) : g = l[5];
	let _ = h === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", v = h === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", y = h === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", b = h === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", x;
	l[6] !== f || l[7] !== _ || l[8] !== v || l[9] !== y || l[10] !== b ? (x = cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", _, v, y, b, f), l[6] = f, l[7] = _, l[8] = v, l[9] = y, l[10] = b, l[11] = x) : x = l[11];
	let S;
	l[12] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
		className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
		children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
			className: "sr-only",
			children: "Close"
		})]
	}), l[12] = S) : S = l[12];
	let C;
	return l[13] !== u || l[14] !== p || l[15] !== x ? (C = /* @__PURE__ */ jsxs(SheetPortal, { children: [g, /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
		"data-slot": "sheet-content",
		className: x,
		...p,
		children: [u, S]
	})] }), l[13] = u, l[14] = p, l[15] = x, l[16] = C) : C = l[16], C;
}
function SheetHeader(i) {
	let a = c(8), o, s;
	a[0] === i ? (o = a[1], s = a[2]) : ({className: o, ...s} = i, a[0] = i, a[1] = o, a[2] = s);
	let l;
	a[3] === o ? l = a[4] : (l = cn("flex flex-col gap-1.5 p-4", o), a[3] = o, a[4] = l);
	let u;
	return a[5] !== s || a[6] !== l ? (u = /* @__PURE__ */ jsx("div", {
		"data-slot": "sheet-header",
		className: l,
		...s
	}), a[5] = s, a[6] = l, a[7] = u) : u = a[7], u;
}
function SheetFooter(i) {
	let a = c(8), o, s;
	a[0] === i ? (o = a[1], s = a[2]) : ({className: o, ...s} = i, a[0] = i, a[1] = o, a[2] = s);
	let l;
	a[3] === o ? l = a[4] : (l = cn("mt-auto flex flex-col gap-2 p-4", o), a[3] = o, a[4] = l);
	let u;
	return a[5] !== s || a[6] !== l ? (u = /* @__PURE__ */ jsx("div", {
		"data-slot": "sheet-footer",
		className: l,
		...s
	}), a[5] = s, a[6] = l, a[7] = u) : u = a[7], u;
}
function SheetTitle(i) {
	let a = c(8), s, l;
	a[0] === i ? (s = a[1], l = a[2]) : ({className: s, ...l} = i, a[0] = i, a[1] = s, a[2] = l);
	let u;
	a[3] === s ? u = a[4] : (u = cn("text-foreground font-semibold", s), a[3] = s, a[4] = u);
	let d;
	return a[5] !== l || a[6] !== u ? (d = /* @__PURE__ */ jsx(SheetPrimitive.Title, {
		"data-slot": "sheet-title",
		className: u,
		...l
	}), a[5] = l, a[6] = u, a[7] = d) : d = a[7], d;
}
function SheetDescription(i) {
	let a = c(8), s, l;
	a[0] === i ? (s = a[1], l = a[2]) : ({className: s, ...l} = i, a[0] = i, a[1] = s, a[2] = l);
	let u;
	a[3] === s ? u = a[4] : (u = cn("text-muted-foreground text-sm", s), a[3] = s, a[4] = u);
	let d;
	return a[5] !== l || a[6] !== u ? (d = /* @__PURE__ */ jsx(SheetPrimitive.Description, {
		"data-slot": "sheet-description",
		className: u,
		...l
	}), a[5] = l, a[6] = u, a[7] = d) : d = a[7], d;
}
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
