import { cn as e } from "../../lib/utils.js";
import "react";
import { jsx as t, jsxs as n } from "react/jsx-runtime";
import { XIcon as r } from "lucide-react";
import * as i from "@radix-ui/react-dialog";
//#region src/components/ui/dialog.tsx
function a({ ...e }) {
	return /* @__PURE__ */ t(i.Root, {
		"data-slot": "dialog",
		...e
	});
}
function o({ ...e }) {
	return /* @__PURE__ */ t(i.Trigger, {
		"data-slot": "dialog-trigger",
		...e
	});
}
function s({ ...e }) {
	return /* @__PURE__ */ t(i.Portal, {
		"data-slot": "dialog-portal",
		...e
	});
}
function c({ ...e }) {
	return /* @__PURE__ */ t(i.Close, {
		"data-slot": "dialog-close",
		...e
	});
}
function l({ className: n, ...r }) {
	return /* @__PURE__ */ t(i.Overlay, {
		"data-slot": "dialog-overlay",
		className: e("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", n),
		...r
	});
}
function u({ className: a, children: o, showCloseButton: c = !0, ...u }) {
	return /* @__PURE__ */ n(s, {
		"data-slot": "dialog-portal",
		children: [/* @__PURE__ */ t(l, {}), /* @__PURE__ */ n(i.Content, {
			"data-slot": "dialog-content",
			className: e("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", a),
			...u,
			children: [o, c && /* @__PURE__ */ n(i.Close, {
				"data-slot": "dialog-close",
				className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
				children: [/* @__PURE__ */ t(r, {}), /* @__PURE__ */ t("span", {
					className: "sr-only",
					children: "Close"
				})]
			})]
		})]
	});
}
function d({ className: n, ...r }) {
	return /* @__PURE__ */ t("div", {
		"data-slot": "dialog-header",
		className: e("flex flex-col gap-2 text-center sm:text-left", n),
		...r
	});
}
function f({ className: n, ...r }) {
	return /* @__PURE__ */ t("div", {
		"data-slot": "dialog-footer",
		className: e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", n),
		...r
	});
}
function p({ className: n, ...r }) {
	return /* @__PURE__ */ t(i.Title, {
		"data-slot": "dialog-title",
		className: e("text-lg leading-none font-semibold", n),
		...r
	});
}
function m({ className: n, ...r }) {
	return /* @__PURE__ */ t(i.Description, {
		"data-slot": "dialog-description",
		className: e("text-muted-foreground text-sm", n),
		...r
	});
}
//#endregion
export { a as Dialog, c as DialogClose, u as DialogContent, m as DialogDescription, f as DialogFooter, d as DialogHeader, l as DialogOverlay, s as DialogPortal, p as DialogTitle, o as DialogTrigger };
