import{j as o}from"./query-vendor-CZu0EHPe.js";import{r as s}from"./react-vendor-0bvDbF03.js";import{aI as L,bv as m,an as k,al as G,aJ as u,bw as H,am as q,aK as V,bx as W,ap as Y,aq as B,ao as A,ar as J,as as K,b as n,d as D}from"./index-DzVf5QXp.js";var v="AlertDialog",[Q,ve]=L(v,[m]),i=m(),x=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(J,{...r,...t,modal:!0})};x.displayName=v;var U="AlertDialogTrigger",N=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(k,{...l,...r,ref:a})});N.displayName=U;var X="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(K,{...r,...t})};y.displayName=X;var Z="AlertDialogOverlay",b=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(G,{...l,...r,ref:a})});b.displayName=Z;var c="AlertDialogContent",[ee,ae]=Q(c),R=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,children:r,...l}=e,g=i(t),p=s.useRef(null),F=u(a,p),f=s.useRef(null);return o.jsx(H,{contentName:c,titleName:_,docsSlug:"alert-dialog",children:o.jsx(ee,{scope:t,cancelRef:f,children:o.jsxs(q,{role:"alertdialog",...g,...l,ref:F,onOpenAutoFocus:V(l.onOpenAutoFocus,d=>{d.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[o.jsx(W,{children:r}),o.jsx(oe,{contentRef:p})]})})})});R.displayName=c;var _="AlertDialogTitle",h=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(Y,{...l,...r,ref:a})});h.displayName=_;var j="AlertDialogDescription",w=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(B,{...l,...r,ref:a})});w.displayName=j;var te="AlertDialogAction",E=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(A,{...l,...r,ref:a})});E.displayName=te;var C="AlertDialogCancel",P=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,{cancelRef:l}=ae(C,t),g=i(t),p=u(a,l);return o.jsx(A,{...g,...r,ref:p})});P.displayName=C;var oe=({contentRef:e})=>{const a=`\`${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 \`${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 \`${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(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(a)},[a,e]),null},re=x,se=N,le=y,S=b,T=R,O=E,$=P,M=h,I=w;const xe=re,Ne=se,ie=le,z=s.forwardRef(({className:e,...a},t)=>o.jsx(S,{className:n("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),...a,ref:t}));z.displayName=S.displayName;const ne=s.forwardRef(({className:e,...a},t)=>o.jsxs(ie,{children:[o.jsx(z,{}),o.jsx(T,{ref:t,className:n("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),...a})]}));ne.displayName=T.displayName;const ce=({className:e,...a})=>o.jsx("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...a});ce.displayName="AlertDialogHeader";const de=({className:e,...a})=>o.jsx("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});de.displayName="AlertDialogFooter";const pe=s.forwardRef(({className:e,...a},t)=>o.jsx(M,{ref:t,className:n("text-lg font-semibold",e),...a}));pe.displayName=M.displayName;const ge=s.forwardRef(({className:e,...a},t)=>o.jsx(I,{ref:t,className:n("text-sm text-muted-foreground",e),...a}));ge.displayName=I.displayName;const fe=s.forwardRef(({className:e,...a},t)=>o.jsx(O,{ref:t,className:n(D({variant:"primary",size:"pill"}),"gap-2",e),...a}));fe.displayName=O.displayName;const me=s.forwardRef(({className:e,...a},t)=>o.jsx($,{ref:t,className:n(D({variant:"ghost",size:"pill"}),"mt-2 sm:mt-0 border border-nature-forest/25 text-ink hover:bg-nature-honey/40",e),...a}));me.displayName=$.displayName;export{xe as A,ne as a,ce as b,pe as c,ge as d,de as e,me as f,fe as g,Ne as h};