'use client';'use strict';

var chunkQL4GOF3V_cjs = require('./chunk-QL4GOF3V.cjs');
var reactDialog = require('@radix-ui/react-dialog');
var css = require('@onbeam/styled-system/css');
var react = require('react');
var icons = require('@onbeam/icons');
var recipes = require('@onbeam/styled-system/recipes');
var jsxRuntime = require('react/jsx-runtime');

var M=react.forwardRef(({className:t,...r},n)=>{let a=recipes.modal();return jsxRuntime.jsx(reactDialog.Overlay,{ref:n,className:css.cx(a.bgOverlay,t),...r})});M.displayName="ModalBackgroundOverlay";var C=react.forwardRef(({className:t,children:r,...n},a)=>{let l=recipes.modal();return jsxRuntime.jsx(reactDialog.Content,{ref:a,className:css.cx(recipes.customScrollbar(),l.content,t),...n,children:r})});C.displayName="ModalContent";var T=react.forwardRef(({children:t,open:r,onOpenChange:n,trigger:a,title:l,description:D,size:W="lg",hideTitle:c,hideDescription:k,hideCloseButton:N,...x},B)=>{let s=react.useRef(null),u=react.useRef(),e=recipes.modal();return react.useEffect(()=>{if(!s.current)return;s.current.getRootNode().nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(u.current=s.current.getRootNode());},[]),jsxRuntime.jsxs(reactDialog.Root,{open:r,onOpenChange:n,children:[jsxRuntime.jsx(reactDialog.Trigger,{ref:s,asChild:!0,children:a??jsxRuntime.jsx("div",{"aria-hidden":!0,className:e.hidden})}),jsxRuntime.jsx(reactDialog.Portal,{container:u.current,children:jsxRuntime.jsx(M,{onWheel:d=>d.stopPropagation(),onTouchMove:d=>d.stopPropagation(),children:jsxRuntime.jsx(C,{ref:B,...x,children:jsxRuntime.jsxs(chunkQL4GOF3V_cjs.a,{size:W,children:[!c||!N?jsxRuntime.jsxs("div",{className:e.header,children:[jsxRuntime.jsx(reactDialog.Title,{className:e.title,"data-hidden":c,children:l}),!N&&jsxRuntime.jsx(reactDialog.Close,{className:e.close,children:jsxRuntime.jsx(icons.CloseIcon,{height:16,width:16})})]}):jsxRuntime.jsx(reactDialog.Title,{className:e.title,"data-hidden":c,children:l}),jsxRuntime.jsxs("div",{className:e.cardContent,children:[jsxRuntime.jsx(reactDialog.Description,{className:e.description,"data-hidden":k,children:D}),t]})]})})})})]})});T.displayName="Modal";var _={Root:reactDialog.Root,Trigger:reactDialog.Trigger,Portal:reactDialog.Portal,Close:reactDialog.Close,Overlay:M,Content:C,Title:reactDialog.Title,Description:reactDialog.Description};

exports.a = T;
exports.b = _;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-2LH5NLJF.cjs.map