import{Cu as e,Du as t,Eu as n,Jl as r,Pd as i,Tu as a,Yl as o,au as s,cu as c,du as l,fu as ee,iu as u,lu as d,ou as te,pu as f,su as p,uu as ne,xu as re,zd as ie}from"./index-Q5R6-AeA.js";var m=ie(i(),1),h=n(),g=`AlertDialog`,[_,ae]=e(g,[f]),v=f(),y=e=>{let{__scopeAlertDialog:t,...n}=e,r=v(t);return(0,h.jsx)(d,{...r,...n,modal:!0})};y.displayName=g;var oe=`AlertDialogTrigger`,b=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(l,{...i,...r,ref:t})});b.displayName=oe;var se=`AlertDialogPortal`,x=e=>{let{__scopeAlertDialog:t,...n}=e,r=v(t);return(0,h.jsx)(c,{...r,...n})};x.displayName=se;var S=`AlertDialogOverlay`,C=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(p,{...i,...r,ref:t})});C.displayName=S;var w=`AlertDialogContent`,[T,E]=_(w),D=a(`AlertDialogContent`),O=m.forwardRef((e,n)=>{let{__scopeAlertDialog:r,children:i,...a}=e,o=v(r),c=m.useRef(null),l=t(n,c),u=m.useRef(null);return(0,h.jsx)(ee,{contentName:w,titleName:k,docsSlug:`alert-dialog`,children:(0,h.jsx)(T,{scope:r,cancelRef:u,children:(0,h.jsxs)(s,{role:`alertdialog`,...o,...a,ref:l,onOpenAutoFocus:re(a.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,h.jsx)(D,{children:i}),(0,h.jsx)(I,{contentRef:c})]})})})});O.displayName=w;var k=`AlertDialogTitle`,A=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(ne,{...i,...r,ref:t})});A.displayName=k;var j=`AlertDialogDescription`,M=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(te,{...i,...r,ref:t})});M.displayName=j;var ce=`AlertDialogAction`,N=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(u,{...i,...r,ref:t})});N.displayName=ce;var P=`AlertDialogCancel`,F=m.forwardRef((e,n)=>{let{__scopeAlertDialog:r,...i}=e,{cancelRef:a}=E(P,r),o=v(r),s=t(n,a);return(0,h.jsx)(u,{...o,...i,ref:s})});F.displayName=P;var I=({contentRef:e})=>{let t=`\`${w}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${w}\` by passing a \`${j}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${w}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},L=y,R=b,z=x,B=C,V=O,H=N,U=F,W=A,G=M,le=L,ue=R,de=z,K=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(B,{className:o(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));K.displayName=B.displayName;var q=m.forwardRef(({className:e,...t},n)=>(0,h.jsxs)(de,{children:[(0,h.jsx)(K,{}),(0,h.jsx)(V,{ref:n,className:o(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-gray-800 dark:bg-gray-950`,e),...t})]}));q.displayName=V.displayName;var J=({className:e,...t})=>(0,h.jsx)(`div`,{className:o(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});J.displayName=`AlertDialogHeader`;var Y=({className:e,...t})=>(0,h.jsx)(`div`,{className:o(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Y.displayName=`AlertDialogFooter`;var X=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(W,{ref:n,className:o(`text-lg font-semibold`,e),...t}));X.displayName=W.displayName;var Z=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(G,{ref:n,className:o(`text-sm text-gray-500 dark:text-gray-400`,e),...t}));Z.displayName=G.displayName;var Q=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(H,{ref:n,className:o(r(),e),...t}));Q.displayName=H.displayName;var $=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(U,{ref:n,className:o(r({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));$.displayName=U.displayName;export{Z as a,X as c,q as i,ue as l,Q as n,Y as o,$ as r,J as s,le as t};