1import{j as o,r as s,w as f,x as n,U as u}from"./index-DpB6CMz4.js";import{c as L,a as z}from"./index-D_5yL6Dp.js";import{R as G,c as A,P as H,W,C as k,T as B,D as V,a as D,O as Y,b as q}from"./index-DRxN6Y5t.js";var U=Symbol("radix.slottable");function J(a){const e=({children:t})=>o.jsx(o.Fragment,{children:t});return e.displayName=`${a}.Slottable`,e.__radixId=U,e}var v="AlertDialog",[K]=z(v,[A]),i=A(),x=a=>{const{__scopeAlertDialog:e,...t}=a,r=i(e);return o.jsx(G,{...r,...t,modal:!0})};x.displayName=v;var Q="AlertDialogTrigger",X=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...r}=a,l=i(t);return o.jsx(q,{...l,...r,ref:e})});X.displayName=Q;var Z="AlertDialogPortal",N=a=>{const{__scopeAlertDialog:e,...t}=a,r=i(e);return o.jsx(H,{...r,...t})};N.displayName=Z;var ee="AlertDialogOverlay",y=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...r}=a,l=i(t);return o.jsx(Y,{...l,...r,ref:e})});y.displayName=ee;var c="AlertDialogContent",[ae,te]=K(c),oe=J("AlertDialogContent"),R=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,children:r,...l}=a,g=i(t),p=s.useRef(null),F=f(e,p),m=s.useRef(null);return o.jsx(W,{contentName:c,titleName:_,docsSlug:"alert-dialog",children:o.jsx(ae,{scope:t,cancelRef:m,children:o.jsxs(k,{role:"alertdialog",...g,...l,ref:F,onOpenAutoFocus:L(l.onOpenAutoFocus,d=>{d.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[o.jsx(oe,{children:r}),o.jsx(se,{contentRef:p})]})})})});R.displayName=c;var _="AlertDialogTitle",b=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...r}=a,l=i(t);return o.jsx(B,{...l,...r,ref:e})});b.displayName=_;var j="AlertDialogDescription",w=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...r}=a,l=i(t);return o.jsx(V,{...l,...r,ref:e})});w.displayName=j;var re="AlertDialogAction",E=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...r}=a,l=i(t);return o.jsx(D,{...l,...r,ref:e})});E.displayName=re;var h="AlertDialogCancel",C=s.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...r}=a,{cancelRef:l}=te(h,t),g=i(t),p=f(e,l);return o.jsx(D,{...g,...r,ref:p})});C.displayName=h;var se=({contentRef:a})=>{const e=`\`${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 \`${j}\` 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(()=>{document.getElementById(a.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,a]),null},le=x,ie=N,S=y,T=R,P=E,O=C,$=b,I=w;const xe=le,ne=ie,M=s.forwardRef(({className:a,...e},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",a),...e,ref:t}));M.displayName=S.displayName;const ce=s.forwardRef(({className:a,...e},t)=>o.jsxs(ne,{children:[o.jsx(M,{}),o.jsx(T,{ref:t,className:n("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-1.5rem)] max-w-[calc(100vw-1.5rem)] sm:w-full sm:max-w-xl max-h-[calc(100dvh-2rem)] overflow-y-auto overscroll-contain 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",a),...e})]}));ce.displayName=T.displayName;const de=({className:a,...e})=>o.jsx("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",a),...e});de.displayName="AlertDialogHeader";const pe=({className:a,...e})=>o.jsx("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});pe.displayName="AlertDialogFooter";const ge=s.forwardRef(({className:a,...e},t)=>o.jsx($,{ref:t,className:n("text-lg font-semibold",a),...e}));ge.displayName=$.displayName;const me=s.forwardRef(({className:a,...e},t)=>o.jsx(I,{ref:t,className:n("text-sm text-muted-foreground",a),...e}));me.displayName=I.displayName;const fe=s.forwardRef(({className:a,...e},t)=>o.jsx(P,{ref:t,className:n(u(),a),...e}));fe.displayName=P.displayName;const ue=s.forwardRef(({className:a,...e},t)=>o.jsx(O,{ref:t,className:n(u({variant:"outline"}),"mt-2 sm:mt-0",a),...e}));ue.displayName=O.displayName;export{xe as A,ce as a,de as b,ge as c,me as d,ue as e,fe as f,pe 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.