import{j as s,J as w,r as n,at as m,aT as O,M,av as I,T as z,Q as F,X as A,aU as v,U as L,aK as G,ay as W,Y,W as k,c as i}from"./index-XbihxApF.js";import{c as p,b as D}from"./button-h0tC9PDp.js";var x="AlertDialog",[H]=W(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var U="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(Y,{...o,...a,ref:e})});y.displayName=U;var V="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(L,{...a,...t})};j.displayName=V;var q="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(k,{...o,...a,ref:e})});_.displayName=q;var g="AlertDialogContent",[B,J]=H(g),K=G("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,r=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return s.jsx(O,{contentName:g,titleName:b,docsSlug:"alert-dialog",children:s.jsx(B,{scope:t,cancelRef:u,children:s.jsxs(M,{role:"alertdialog",...r,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[s.jsx(K,{children:a}),s.jsx(X,{contentRef:c})]})})})});h.displayName=g;var b="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(z,{...o,...a,ref:e})});$.displayName=b;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(F,{...o,...a,ref:e})});R.displayName=E;var Q="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(A,{...o,...a,ref:e})});C.displayName=Q;var T="AlertDialogCancel",S=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=J(T,t),r=d(t),c=m(e,o);return s.jsx(A,{...r,...a,ref:c})});S.displayName=T;var X=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${g}\` by passing a \`${E}\` 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 \`${g}\`. 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 n.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Z=N,ee=y,te=j,ae=_,oe=h,le=C,re=S,se=$,ie=R;function ge(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(Z,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function fe(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(ee,{"data-slot":"alert-dialog-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(te,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ce(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(ae,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ue(l){const e=i.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{}),e[3]=o):o=e[3];let r;e[4]!==t?(r=p("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=r):r=e[5];let c;return e[6]!==a||e[7]!==r?(c=s.jsxs(ne,{children:[o,s.jsx(oe,{"data-slot":"alert-dialog-content",className:r,...a})]}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function me(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Ae(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ve(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(se,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function De(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(ie,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function xe(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(D(),t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Ne(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(D({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(re,{className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}export{Ne as A,ue as a,me as b,ve as c,De as d,Ae as e,ge as f,xe as g,fe as h};
