'use strict';

var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var index = require('../../node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs');
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var React = require('react');
var clsx = require('../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs');
var dialog_module = require('./dialog.module.css.cjs');

const dialogContent = index$1.cva(dialog_module.default.dialogContent);
const DialogContent = React.forwardRef(({ className, children, ariaLabel, ariaDescription, overlayBlur = false, overlayClassName, overlayStyle, width, close, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsxs(index.Portal, { children: [jsxRuntime.jsxRuntimeExports.jsx(index.Overlay, { className: clsx.clsx(dialog_module.default.dialogOverlay, overlayClassName, overlayBlur && dialog_module.default.overlayBlur), style: overlayStyle, "aria-hidden": "true", role: "presentation" }), jsxRuntime.jsxRuntimeExports.jsxs(index.Content, { ref: ref, className: dialogContent({ className }), style: { width, ...props.style }, "aria-label": ariaLabel, "aria-describedby": ariaDescription ? 'dialog-description' : undefined, ...props, children: [children, close && jsxRuntime.jsxRuntimeExports.jsx(CloseButton, {})] })] })));
DialogContent.displayName = index.Content.displayName;
function CloseButton({ children = jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.Cross1Icon, {}), className, ...props }) {
    return (jsxRuntime.jsxRuntimeExports.jsx(index.Close, { className: dialog_module.default.close, "aria-label": "Close dialog", ...props, children: children }));
}
function DialogTitle({ children, ...props }) {
    return (jsxRuntime.jsxRuntimeExports.jsx(index.Title, { ...props, role: "heading", "aria-level": 1, children: children }));
}
function DialogDescription({ children, className, ...props }) {
    return (jsxRuntime.jsxRuntimeExports.jsx(index.Description, { ...props, className: className, id: "dialog-description", role: "document", children: children }));
}
const Dialog = Object.assign(index.Root, {
    Trigger: index.Trigger,
    Content: DialogContent,
    Close: CloseButton,
    Title: DialogTitle,
    Description: DialogDescription,
});

exports.CloseButton = CloseButton;
exports.Dialog = Dialog;
//# sourceMappingURL=dialog.cjs.map
