import { cn } from "../../lib/utils.js";
import { buttonVariants } from "./button.js";
import { c } from "react/compiler-runtime";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
function AlertDialog(e) {
	let o = c(4), s;
	o[0] === e ? s = o[1] : ({...s} = e, o[0] = e, o[1] = s);
	let u;
	return o[2] === s ? u = o[3] : (u = /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, {
		"data-slot": "alert-dialog",
		...s
	}), o[2] = s, o[3] = u), u;
}
function AlertDialogTrigger(e) {
	let o = c(4), s;
	o[0] === e ? s = o[1] : ({...s} = e, o[0] = e, o[1] = s);
	let u;
	return o[2] === s ? u = o[3] : (u = /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, {
		"data-slot": "alert-dialog-trigger",
		...s
	}), o[2] = s, o[3] = u), u;
}
function AlertDialogPortal(e) {
	let o = c(4), s;
	o[0] === e ? s = o[1] : ({...s} = e, o[0] = e, o[1] = s);
	let u;
	return o[2] === s ? u = o[3] : (u = /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, {
		"data-slot": "alert-dialog-portal",
		...s
	}), o[2] = s, o[3] = u), u;
}
function AlertDialogOverlay(o) {
	let s = c(8), u, d;
	s[0] === o ? (u = s[1], d = s[2]) : ({className: u, ...d} = o, s[0] = o, s[1] = u, s[2] = d);
	let f;
	s[3] === u ? f = s[4] : (f = 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", u), s[3] = u, s[4] = f);
	let p;
	return s[5] !== d || s[6] !== f ? (p = /* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, {
		"data-slot": "alert-dialog-overlay",
		className: f,
		...d
	}), s[5] = d, s[6] = f, s[7] = p) : p = s[7], p;
}
function AlertDialogContent(o) {
	let u = c(9), d, m;
	u[0] === o ? (d = u[1], m = u[2]) : ({className: d, ...m} = o, u[0] = o, u[1] = d, u[2] = m);
	let h;
	u[3] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx(AlertDialogOverlay, {}), u[3] = h) : h = u[3];
	let g;
	u[4] === d ? g = u[5] : (g = cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", d), u[4] = d, u[5] = g);
	let _;
	return u[6] !== m || u[7] !== g ? (_ = /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [h, /* @__PURE__ */ jsx(AlertDialogPrimitive.Content, {
		"data-slot": "alert-dialog-content",
		className: g,
		...m
	})] }), u[6] = m, u[7] = g, u[8] = _) : _ = u[8], _;
}
function AlertDialogHeader(o) {
	let s = c(8), l, u;
	s[0] === o ? (l = s[1], u = s[2]) : ({className: l, ...u} = o, s[0] = o, s[1] = l, s[2] = u);
	let d;
	s[3] === l ? d = s[4] : (d = cn("flex flex-col gap-2 text-center sm:text-left", l), s[3] = l, s[4] = d);
	let f;
	return s[5] !== u || s[6] !== d ? (f = /* @__PURE__ */ jsx("div", {
		"data-slot": "alert-dialog-header",
		className: d,
		...u
	}), s[5] = u, s[6] = d, s[7] = f) : f = s[7], f;
}
function AlertDialogFooter(o) {
	let s = c(8), l, u;
	s[0] === o ? (l = s[1], u = s[2]) : ({className: l, ...u} = o, s[0] = o, s[1] = l, s[2] = u);
	let d;
	s[3] === l ? d = s[4] : (d = cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", l), s[3] = l, s[4] = d);
	let f;
	return s[5] !== u || s[6] !== d ? (f = /* @__PURE__ */ jsx("div", {
		"data-slot": "alert-dialog-footer",
		className: d,
		...u
	}), s[5] = u, s[6] = d, s[7] = f) : f = s[7], f;
}
function AlertDialogTitle(o) {
	let s = c(8), u, d;
	s[0] === o ? (u = s[1], d = s[2]) : ({className: u, ...d} = o, s[0] = o, s[1] = u, s[2] = d);
	let f;
	s[3] === u ? f = s[4] : (f = cn("text-lg font-semibold", u), s[3] = u, s[4] = f);
	let p;
	return s[5] !== d || s[6] !== f ? (p = /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, {
		"data-slot": "alert-dialog-title",
		className: f,
		...d
	}), s[5] = d, s[6] = f, s[7] = p) : p = s[7], p;
}
function AlertDialogDescription(o) {
	let s = c(8), u, d;
	s[0] === o ? (u = s[1], d = s[2]) : ({className: u, ...d} = o, s[0] = o, s[1] = u, s[2] = d);
	let f;
	s[3] === u ? f = s[4] : (f = cn("text-muted-foreground text-sm", u), s[3] = u, s[4] = f);
	let p;
	return s[5] !== d || s[6] !== f ? (p = /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, {
		"data-slot": "alert-dialog-description",
		className: f,
		...d
	}), s[5] = d, s[6] = f, s[7] = p) : p = s[7], p;
}
function AlertDialogAction(s) {
	let u = c(8), d, f;
	u[0] === s ? (d = u[1], f = u[2]) : ({className: d, ...f} = s, u[0] = s, u[1] = d, u[2] = f);
	let p;
	u[3] === d ? p = u[4] : (p = cn(buttonVariants(), d), u[3] = d, u[4] = p);
	let m;
	return u[5] !== f || u[6] !== p ? (m = /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
		className: p,
		...f
	}), u[5] = f, u[6] = p, u[7] = m) : m = u[7], m;
}
function AlertDialogCancel(s) {
	let u = c(8), d, f;
	u[0] === s ? (d = u[1], f = u[2]) : ({className: d, ...f} = s, u[0] = s, u[1] = d, u[2] = f);
	let p;
	u[3] === d ? p = u[4] : (p = cn(buttonVariants({ variant: "outline" }), d), u[3] = d, u[4] = p);
	let m;
	return u[5] !== f || u[6] !== p ? (m = /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, {
		className: p,
		...f
	}), u[5] = f, u[6] = p, u[7] = m) : m = u[7], m;
}
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
