1import{j as o,r as s,b as u,d as L,a2 as G,e as H,f as n}from"./index-l-T5Ch24.js";import{R as W,c as A,P as k,W as V,a as Y,b as q,D as B,C as D,O as J,T as K}from"./index-D8ULU4SF.js";import{b as v}from"./button-D5ctGPS4.js";var x="AlertDialog",[Q]=H(x,[A]),i=A(),N=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(W,{...r,...t,modal:!0})};N.displayName=x;var U="AlertDialogTrigger",X=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(K,{...l,...r,ref:a})});X.displayName=U;var Z="AlertDialogPortal",y=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.jsx(k,{...r,...t})};y.displayName=Z;var ee="AlertDialogOverlay",R=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(J,{...l,...r,ref:a})});R.displayName=ee;var c="AlertDialogContent",[ae,te]=Q(c),oe=G("AlertDialogContent"),_=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,children:r,...l}=e,g=i(t),p=s.useRef(null),z=u(a,p),f=s.useRef(null);return o.jsx(V,{contentName:c,titleName:j,docsSlug:"alert-dialog",children:o.jsx(ae,{scope:t,cancelRef:f,children:o.jsxs(Y,{role:"alertdialog",...g,...l,ref:z,onOpenAutoFocus:L(l.onOpenAutoFocus,d=>{var m;d.preventDefault(),(m=f.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[o.jsx(oe,{children:r}),o.jsx(se,{contentRef:p})]})})})});_.displayName=c;var j="AlertDialogTitle",b=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(q,{...l,...r,ref:a})});b.displayName=j;var C="AlertDialogDescription",h=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(B,{...l,...r,ref:a})});h.displayName=C;var re="AlertDialogAction",w=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,l=i(t);return o.jsx(D,{...l,...r,ref:a})});w.displayName=re;var E="AlertDialogCancel",P=s.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,{cancelRef:l}=te(E,t),g=i(t),p=u(a,l);return o.jsx(D,{...g,...r,ref:p})});P.displayName=E;var se=({contentRef:e})=>{const a=`\`${c}\` requires a description for the component to be accessible for screen reader users. 2 3You 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. 4 5Alternatively, 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. 6 7For 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(a)},[a,e]),null},le=N,ie=y,S=R,T=_,O=w,$=P,M=b,I=h;const xe=le,ne=ie,F=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}));F.displayName=S.displayName;const ce=s.forwardRef(({className:e,...a},t)=>o.jsxs(ne,{children:[o.jsx(F,{}),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})]}));ce.displayName=T.displayName;const de=({className:e,...a})=>o.jsx("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...a});de.displayName="AlertDialogHeader";const pe=({className:e,...a})=>o.jsx("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});pe.displayName="AlertDialogFooter";const ge=s.forwardRef(({className:e,...a},t)=>o.jsx(M,{ref:t,className:n("text-lg font-semibold",e),...a}));ge.displayName=M.displayName;const fe=s.forwardRef(({className:e,...a},t)=>o.jsx(I,{ref:t,className:n("text-sm text-muted-foreground",e),...a}));fe.displayName=I.displayName;const me=s.forwardRef(({className:e,...a},t)=>o.jsx(O,{ref:t,className:n(v(),e),...a}));me.displayName=O.displayName;const ue=s.forwardRef(({className:e,...a},t)=>o.jsx($,{ref:t,className:n(v({variant:"outline"}),"mt-2 sm:mt-0",e),...a}));ue.displayName=$.displayName;export{xe as A,ce as a,de as b,ge as c,fe as d,pe as e,ue as f,me as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.