import{c as e}from"./security-CTzQb9Ko.js";import{$i as t,Qi as n,s as r}from"./bundle-mjs-lcbR1pPJ.js";import{_ as i,f as a,g as o,m as s}from"./dist-C0UdmnhX.js";import{a as c,c as l,i as u,l as ee,n as d,o as te,r as ne,s as f,t as p,u as m}from"./dist-Cyb_AwRv.js";var h=e(t(),1),g=e(n(),1),re=Symbol(`radix.slottable`);function ie(e){let t=({children:e})=>(0,g.jsx)(g.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=re,t}var _=`AlertDialog`,[ae,oe]=s(_,[m]),v=m(),y=e=>{let{__scopeAlertDialog:t,...n}=e,r=v(t);return(0,g.jsx)(te,{...r,...n,modal:!0})};y.displayName=_;var se=`AlertDialogTrigger`,b=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,g.jsx)(l,{...i,...r,ref:t})});b.displayName=se;var ce=`AlertDialogPortal`,x=e=>{let{__scopeAlertDialog:t,...n}=e,r=v(t);return(0,g.jsx)(c,{...r,...n})};x.displayName=ce;var le=`AlertDialogOverlay`,S=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,g.jsx)(u,{...i,...r,ref:t})});S.displayName=le;var C=`AlertDialogContent`,[w,T]=ae(C),E=ie(`AlertDialogContent`),D=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:i,...o}=e,s=v(n),c=h.useRef(null),l=r(t,c),u=h.useRef(null);return(0,g.jsx)(ee,{contentName:C,titleName:O,docsSlug:`alert-dialog`,children:(0,g.jsx)(w,{scope:n,cancelRef:u,children:(0,g.jsxs)(d,{role:`alertdialog`,...s,...o,ref:l,onOpenAutoFocus:a(o.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,g.jsx)(E,{children:i}),(0,g.jsx)(F,{contentRef:c})]})})})});D.displayName=C;var O=`AlertDialogTitle`,k=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,g.jsx)(f,{...i,...r,ref:t})});k.displayName=O;var A=`AlertDialogDescription`,j=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,g.jsx)(ne,{...i,...r,ref:t})});j.displayName=A;var ue=`AlertDialogAction`,M=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,g.jsx)(p,{...i,...r,ref:t})});M.displayName=ue;var N=`AlertDialogCancel`,P=h.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...i}=e,{cancelRef:a}=T(N,n),o=v(n),s=r(t,a);return(0,g.jsx)(p,{...o,...i,ref:s})});P.displayName=N;var F=({contentRef:e})=>{let t=`\`${C}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${C}\` by passing a \`${A}\` 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 \`${C}\`. 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 h.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},I=y,L=b,R=x,z=S,B=D,V=M,H=P,U=k,W=j,G=I,de=L,fe=R,K=h.forwardRef(({className:e,...t},n)=>(0,g.jsx)(z,{className:i(`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=z.displayName;var q=h.forwardRef(({className:e,...t},n)=>(0,g.jsxs)(fe,{children:[(0,g.jsx)(K,{}),(0,g.jsx)(B,{ref:n,className:i(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background 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`,e),...t})]}));q.displayName=B.displayName;var J=({className:e,...t})=>(0,g.jsx)(`div`,{className:i(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});J.displayName=`AlertDialogHeader`;var Y=({className:e,...t})=>(0,g.jsx)(`div`,{className:i(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Y.displayName=`AlertDialogFooter`;var X=h.forwardRef(({className:e,...t},n)=>(0,g.jsx)(U,{ref:n,className:i(`text-lg font-semibold`,e),...t}));X.displayName=U.displayName;var Z=h.forwardRef(({className:e,...t},n)=>(0,g.jsx)(W,{ref:n,className:i(`text-sm text-muted-foreground`,e),...t}));Z.displayName=W.displayName;var Q=h.forwardRef(({className:e,...t},n)=>(0,g.jsx)(V,{ref:n,className:i(o(),e),...t}));Q.displayName=V.displayName;var $=h.forwardRef(({className:e,...t},n)=>(0,g.jsx)(H,{ref:n,className:i(o({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));$.displayName=H.displayName;export{Z as a,X as c,q as i,de as l,Q as n,Y as o,$ as r,J as s,G as t};