import { cn } from "../../lib/utils.js";
import { c } from "react/compiler-runtime";
import "react";
import { jsx } from "react/jsx-runtime";
import { cva } from "class-variance-authority";
var alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
	variants: { variant: {
		default: "bg-card text-card-foreground",
		destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
	} },
	defaultVariants: { variant: "default" }
});
function Alert(r) {
	let a = c(10), o, s, l;
	a[0] === r ? (o = a[1], s = a[2], l = a[3]) : ({className: o, variant: l, ...s} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = l);
	let u;
	a[4] !== o || a[5] !== l ? (u = cn(alertVariants({ variant: l }), o), a[4] = o, a[5] = l, a[6] = u) : u = a[6];
	let d;
	return a[7] !== s || a[8] !== u ? (d = /* @__PURE__ */ jsx("div", {
		"data-slot": "alert",
		role: "alert",
		className: u,
		...s
	}), a[7] = s, a[8] = u, a[9] = d) : d = a[9], d;
}
function AlertTitle(r) {
	let i = c(8), a, o;
	i[0] === r ? (a = i[1], o = i[2]) : ({className: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
	let s;
	i[3] === a ? s = i[4] : (s = cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", a), i[3] = a, i[4] = s);
	let l;
	return i[5] !== o || i[6] !== s ? (l = /* @__PURE__ */ jsx("div", {
		"data-slot": "alert-title",
		className: s,
		...o
	}), i[5] = o, i[6] = s, i[7] = l) : l = i[7], l;
}
function AlertDescription(r) {
	let i = c(8), a, o;
	i[0] === r ? (a = i[1], o = i[2]) : ({className: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
	let s;
	i[3] === a ? s = i[4] : (s = cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", a), i[3] = a, i[4] = s);
	let l;
	return i[5] !== o || i[6] !== s ? (l = /* @__PURE__ */ jsx("div", {
		"data-slot": "alert-description",
		className: s,
		...o
	}), i[5] = o, i[6] = s, i[7] = l) : l = i[7], l;
}
export { Alert, AlertDescription, AlertTitle };
