'use strict';

var jsxRuntime = require('react/jsx-runtime');
var reactI18next = require('react-i18next');
var utils = require('./utils-CTr7wn5d.js');
var button = require('./button--P7-oIJb.js');
var x = require('./x-Brw3FJst.js');
var index = require('./index-BLGrl3PF.js');

function Dialog({ ...props }) {
    return jsxRuntime.jsx(index.Root, { "data-slot": "dialog", ...props });
}
function DialogTrigger({ ...props }) {
    return jsxRuntime.jsx(index.Trigger, { "data-slot": "dialog-trigger", ...props });
}
function DialogPortal({ ...props }) {
    return jsxRuntime.jsx(index.Portal, { "data-slot": "dialog-portal", ...props });
}
function DialogClose({ ...props }) {
    return jsxRuntime.jsx(index.Close, { "data-slot": "dialog-close", ...props });
}
function DialogOverlay({ className, ...props }) {
    return (jsxRuntime.jsx(index.Overlay, { "data-slot": "dialog-overlay", className: utils.cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
}
function DialogContent({ className, children, showCloseButton = true, ...props }) {
    const { t } = reactI18next.useTranslation();
    return (jsxRuntime.jsxs(DialogPortal, { children: [jsxRuntime.jsx(DialogOverlay, {}), jsxRuntime.jsxs(index.Content, { "data-slot": "dialog-content", className: utils.cn("fixed top-1/2 start-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 gap-5 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (jsxRuntime.jsx(index.Close, { "data-slot": "dialog-close", asChild: true, children: jsxRuntime.jsxs(button.Button, { variant: "ghost", className: "absolute top-2 end-2", size: "icon-sm", children: [jsxRuntime.jsx(x.X, {}), jsxRuntime.jsx("span", { className: "sr-only", children: t("neetoatoms.dialog.close", "Close") })] }) }))] })] }));
}
function DialogHeader({ className, ...props }) {
    return (jsxRuntime.jsx("div", { "data-slot": "dialog-header", className: utils.cn("flex flex-col gap-3", className), ...props }));
}
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
    return (jsxRuntime.jsxs("div", { "data-slot": "dialog-footer", className: utils.cn("-mx-6 -mb-6 flex flex-col-reverse gap-2 rounded-b-xl bg-muted/50 px-6 py-4 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (jsxRuntime.jsx(index.Close, { asChild: true, children: jsxRuntime.jsx(button.Button, { variant: "outline", children: "Close" }) }))] }));
}
function DialogTitle({ className, ...props }) {
    return (jsxRuntime.jsx(index.Title, { "data-slot": "dialog-title", className: utils.cn("text-base leading-none font-medium", className), ...props }));
}
function DialogDescription({ className, ...props }) {
    return (jsxRuntime.jsx(index.Description, { "data-slot": "dialog-description", className: utils.cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
}

exports.Dialog = Dialog;
exports.DialogClose = DialogClose;
exports.DialogContent = DialogContent;
exports.DialogDescription = DialogDescription;
exports.DialogFooter = DialogFooter;
exports.DialogHeader = DialogHeader;
exports.DialogOverlay = DialogOverlay;
exports.DialogPortal = DialogPortal;
exports.DialogTitle = DialogTitle;
exports.DialogTrigger = DialogTrigger;
//# sourceMappingURL=dialog-CWSpiRjk.js.map
