import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{t as r}from"./utils-B6KiDbIe.js";import{i}from"./dist-BHTPujRl.js";import{n as a}from"./button-CpC4WAFQ.js";import{c as o,l as s}from"./dist-ex3CQT46.js";import{a as c,c as l,i as u,l as d,n as f,o as p,r as ee,s as te,t as ne}from"./dist-BoLhn8b9.js";var m=e(t(),1),h=n(),g=`AlertDialog`,[_,re]=s(g,[d]),v=d(),y=e=>{let{__scopeAlertDialog:t,...n}=e,r=v(t);return(0,h.jsx)(ne,{...r,...n,modal:!0})};y.displayName=g;var ie=`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=ie;var ae=`AlertDialogPortal`,x=e=>{let{__scopeAlertDialog:t,...n}=e,r=v(t);return(0,h.jsx)(p,{...r,...n})};x.displayName=ae;var S=`AlertDialogOverlay`,C=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(c,{...i,...r,ref:t})});C.displayName=S;var w=`AlertDialogContent`,[T,E]=_(w),D=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...a}=e,s=v(n),c=i(t,m.useRef(null)),l=m.useRef(null);return(0,h.jsx)(T,{scope:n,cancelRef:l,children:(0,h.jsx)(ee,{role:`alertdialog`,...s,...a,ref:c,onOpenAutoFocus:o(a.onOpenAutoFocus,e=>{e.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});D.displayName=w;var O=`AlertDialogTitle`,k=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(te,{...i,...r,ref:t})});k.displayName=O;var oe=`AlertDialogDescription`,A=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(u,{...i,...r,ref:t})});A.displayName=oe;var se=`AlertDialogAction`,j=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=v(n);return(0,h.jsx)(f,{...i,...r,ref:t})});j.displayName=se;var M=`AlertDialogCancel`,N=m.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=E(M,n),o=v(n),s=i(t,a);return(0,h.jsx)(f,{...o,...r,ref:s})});N.displayName=M;var P=y,F=b,I=x,L=C,R=D,z=j,B=N,V=k,H=A,U=P,W=F,G=I,K=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(L,{className:r(`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=L.displayName;var q=m.forwardRef(({className:e,...t},n)=>(0,h.jsxs)(G,{children:[(0,h.jsx)(K,{}),(0,h.jsx)(R,{ref:n,className:r(`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 sm:rounded-lg`,e),...t})]}));q.displayName=R.displayName;var J=({className:e,...t})=>(0,h.jsx)(`div`,{className:r(`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:r(`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)(V,{ref:n,className:r(`text-lg font-semibold`,e),...t}));X.displayName=V.displayName;var Z=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(H,{ref:n,className:r(`text-sm text-muted-foreground`,e),...t}));Z.displayName=H.displayName;var Q=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(z,{ref:n,className:r(a(),e),...t}));Q.displayName=z.displayName;var $=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(B,{ref:n,className:r(a({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));$.displayName=B.displayName;export{Z as a,X as c,q as i,W as l,Q as n,Y as o,$ as r,J as s,U as t};