import{a as e,n as t}from"./chunk-BneVvdWh.js";import{t as n}from"./react-C7IZe2D1.js";import{ht as r,t as i}from"./dist-DtfJeYQK.js";import{t as a}from"./jsx-runtime-C2wGStra.js";import{g as o,m as s}from"./iframe-D-oZzXNK.js";import{n as c,t as l}from"./dist-Cc1j9Pjk.js";import{n as u,t as d}from"./Heading-BfSBs5r6.js";import{n as f,t as p}from"./Button-DqcfuOFN.js";import{A as m,D as h,E as g,M as _,N as v,O as y,j as b,k as x,t as S}from"./esm-C7OAFD7m.js";var C,w,T,E,D,O,k,A=t((()=>{C=`overlay__vG-Gu`,w=`overlayShow__TBIKv`,T=`content__Nk-Ib`,E=`contentShow__wWPJX`,D=`description__1dRpy`,O=`actions__FsX-e`,k={overlay:C,overlayShow:w,content:T,contentShow:E,description:D,actions:O}})),j,M,N,P,F,I,L,R=t((()=>{j=e(n(),1),S(),s(),A(),u(),i(),l(),f(),M=a(),N=(0,j.forwardRef)(function(e,t){let n=j.Children.only(e.children);return(0,j.isValidElement)(n)?(0,M.jsx)(g,{render:e=>(0,j.cloneElement)(n,{...e,ref:t})}):null}),P=(0,j.forwardRef)(function(e,t){return(0,M.jsx)(_,{ref:t,render:(0,M.jsx)(p,{}),...e})}),F=(0,j.forwardRef)(function(e,t){return(0,M.jsx)(_,{ref:t,render:(0,M.jsx)(p,{}),...e})}),I=({open:e,title:t,description:n,dataset:i,children:a})=>{let s=o(),l=r(i,{preplyDsComponent:c.AlertDialog}),u,f=[];return j.Children.forEach(a,e=>{(0,j.isValidElement)(e)&&(e.type===N?u=e:f.push(e))}),(0,M.jsxs)(y,{open:e,children:[u,(0,M.jsxs)(x,{container:s,children:[(0,M.jsx)(v,{className:k.overlay}),(0,M.jsxs)(m,{...l,className:k.content,children:[(0,M.jsx)(h,{render:(0,M.jsx)(d,{tag:`h3`,variant:`medium`,children:t})}),(0,M.jsx)(b,{className:k.description,children:n}),(0,M.jsx)(`div`,{className:k.actions,children:f})]})]})]})},L=Object.assign(I,{Trigger:N,Action:P,Cancel:F});try{L.displayName=`AlertDialog`,L.__docgenInfo={description:`A modal alertdialog that interrupts the user with important content and expects a response.

Unlike a \`Dialog\`, it cannot be dismissed by clicking outside or pressing escape.`,displayName:`AlertDialog`,props:{title:{defaultValue:null,description:`The alert's title, describing what the user needs to confirm`,name:`title`,required:!0,type:{name:`enum`,value:[{value:`undefined`},{value:`null`},{value:`string`},{value:`number`},{value:`false`},{value:`true`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`},{value:`Iterable<ReactNode>`},{value:`ReactPortal`}]}},description:{defaultValue:null,description:`Details about the action and its consequences`,name:`description`,required:!0,type:{name:`enum`,value:[{value:`undefined`},{value:`null`},{value:`string`},{value:`number`},{value:`false`},{value:`true`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`},{value:`Iterable<ReactNode>`},{value:`ReactPortal`}]}},children:{defaultValue:null,description:"The AlertDialog actions.\n@see  `AlertDialog.Actions` for a common actions convenience wrapper.",name:`children`,required:!0,type:{name:`enum`,value:[{value:`undefined`},{value:`null`},{value:`string`},{value:`number`},{value:`false`},{value:`true`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`},{value:`Iterable<ReactNode>`},{value:`ReactPortal`}]}},open:{defaultValue:null,description:`Controls the visibility of the alert.

Alternatively, you can use the \`AlertDialog.Trigger\` subcomponent for
an uncontrolled instance.`,name:`open`,required:!1,type:{name:`enum`,value:[{value:`false`},{value:`true`}]}},dataset:{defaultValue:null,description:``,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}}}}}catch{}}));export{R as n,L as t};