import{r as s,j as a}from"./app-BBZbvTSO.js";import{c as w,a as O}from"./index-CbDI-tXU.js";import{u as A,e as $,c as n}from"./utils-YhN_nlHn.js";import{c as m,R as M,W as I,C as z,T as F,D as L,a as D,P as G,O as W,b as k}from"./index-C0VDnRYN.js";import{b as v}from"./button-CZmOQP7j.js";var x="AlertDialog",[H,fe]=w(x,[m]),i=m(),N=e=>{const{__scopeAlertDialog:t,...o}=e,r=i(t);return a.jsx(M,{...r,...o,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",Y=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(k,{...l,...r,ref:t})});Y.displayName=V;var q="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:t,...o}=e,r=i(t);return a.jsx(G,{...r,...o})};y.displayName=q;var B="AlertDialogOverlay",j=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(W,{...l,...r,ref:t})});j.displayName=B;var c="AlertDialogContent",[J,K]=H(c),Q=$("AlertDialogContent"),_=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:r,...l}=e,p=i(o),g=s.useRef(null),T=A(t,g),u=s.useRef(null);return a.jsx(I,{contentName:c,titleName:b,docsSlug:"alert-dialog",children:a.jsx(J,{scope:o,cancelRef:u,children:a.jsxs(z,{role:"alertdialog",...p,...l,ref:T,onOpenAutoFocus:O(l.onOpenAutoFocus,d=>{var f;d.preventDefault(),(f=u.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[a.jsx(Q,{children:r}),a.jsx(X,{contentRef:g})]})})})});_.displayName=c;var b="AlertDialogTitle",h=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(F,{...l,...r,ref:t})});h.displayName=b;var C="AlertDialogDescription",R=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(L,{...l,...r,ref:t})});R.displayName=C;var U="AlertDialogAction",E=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,l=i(o);return a.jsx(D,{...l,...r,ref:t})});E.displayName=U;var P="AlertDialogCancel",S=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:l}=K(P,o),p=i(o),g=A(t,l);return a.jsx(D,{...p,...r,ref:g})});S.displayName=P;var X=({contentRef:e})=>{const 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 \`${C}\` 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 s.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Z=N,ee=y,te=j,ae=_,oe=E,re=S,le=h,se=R;function Ae({...e}){return a.jsx(Z,{"data-slot":"alert-dialog",...e})}function ie({...e}){return a.jsx(ee,{"data-slot":"alert-dialog-portal",...e})}function ne({className:e,...t}){return a.jsx(te,{"data-slot":"alert-dialog-overlay",className:n("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-[140000] bg-black/50",e),...t})}function me({className:e,...t}){return a.jsxs(ie,{children:[a.jsx(ne,{}),a.jsx(ae,{"data-slot":"alert-dialog-content",className:n("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-[140000] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function De({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-header",className:n("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ve({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-footer",className:n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function xe({className:e,...t}){return a.jsx(le,{"data-slot":"alert-dialog-title",className:n("text-lg font-semibold",e),...t})}function Ne({className:e,...t}){return a.jsx(se,{"data-slot":"alert-dialog-description",className:n("text-muted-foreground text-sm",e),...t})}function ye({className:e,...t}){return a.jsx(oe,{className:n(v(),e),...t})}function je({className:e,...t}){return a.jsx(re,{className:n(v({variant:"outline"}),e),...t})}export{Ae as A,me as a,De as b,xe as c,Ne as d,ve as e,je as f,ye as g};
