import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Content, Description, Overlay, Portal, Root, Title, } from "@radix-ui/react-dialog";
import { Root as VisuallyHidden } from "@radix-ui/react-visually-hidden";
import { twMerge } from "tailwind-merge";
export function Modal(props) {
    const { title, open, onOpenChange, contentProps, overlayProps, children, ...delegated } = props;
    return (_jsx(Root, { defaultOpen: open, onOpenChange: onOpenChange, open: open, children: _jsx(Portal, { children: _jsx(Overlay, { ...overlayProps, className: twMerge("data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in fixed inset-0 grid place-items-center overflow-y-auto bg-slate-900/50", overlayProps?.className), children: _jsxs(Content, { ...delegated, ...contentProps, className: twMerge("data-[state=closed]:animate-zoom-out data-[state=open]:animate-zoom-in bg-white", contentProps?.className), children: [_jsxs(VisuallyHidden, { children: [_jsx(Title, { children: title || "Modal" }), _jsx(Description, { children: title || "Modal" })] }), children] }) }) }) }));
}
//# sourceMappingURL=modal.js.map