1import{r as u}from"./rolldown-runtime.C1f3BsDW.js";import"./inertia.BE4YqsTM.js";import{Qr as W}from"./icons.ChOq_Y4q.js";import{t as Y}from"./react-core.CAMe6Z4j.js";import"./utils.CgzVjNgC.js";import{M as v,jt as n}from"./entry-client.DX3aUoe5.js";import{d as Q,f as J}from"./dist.CoNAZqlp.js";import{n as A}from"./dist.DxccqHSW.js";import"./es2015.Cr2X04_P.js";import{a as K,c as U,i as X,l as Z,n as ee,o as ae,r as te,s as re,t as D,u as x}from"./dist.DbqQa_sy.js";var l=u(W(),1),r=u(Y(),1),oe=Symbol("radix.slottable");function se(a){const e=({children:t})=>(0,r.jsx)(r.Fragment,{children:t});return e.displayName=`${a}.Slottable`,e.__radixId=oe,e}var N="AlertDialog",[le,Ee]=Q(N,[x]),i=x(),y=a=>{const{__scopeAlertDialog:e,...t}=a,o=i(e);return(0,r.jsx)(ae,{...o,...t,modal:!0})};y.displayName=N;var ie="AlertDialogTrigger",ne=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...o}=a,s=i(t);return(0,r.jsx)(U,{...s,...o,ref:e})});ne.displayName=ie;var ce="AlertDialogPortal",_=a=>{const{__scopeAlertDialog:e,...t}=a,o=i(e);return(0,r.jsx)(K,{...o,...t})};_.displayName=ce;var de="AlertDialogOverlay",j=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...o}=a,s=i(t);return(0,r.jsx)(X,{...s,...o,ref:e})});j.displayName=de;var d="AlertDialogContent",[pe,ge]=le(d),me=se("AlertDialogContent"),h=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,children:o,...s}=a,p=i(t),c=l.useRef(null),m=A(e,c),f=l.useRef(null);return(0,r.jsx)(Z,{contentName:d,titleName:b,docsSlug:"alert-dialog",children:(0,r.jsx)(pe,{scope:t,cancelRef:f,children:(0,r.jsxs)(ee,{role:"alertdialog",...p,...s,ref:m,onOpenAutoFocus:J(s.onOpenAutoFocus,g=>{g.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[(0,r.jsx)(me,{children:o}),(0,r.jsx)(ue,{contentRef:c})]})})})});h.displayName=d;var b="AlertDialogTitle",R=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...o}=a,s=i(t);return(0,r.jsx)(re,{...s,...o,ref:e})});R.displayName=b;var w="AlertDialogDescription",C=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...o}=a,s=i(t);return(0,r.jsx)(te,{...s,...o,ref:e})});C.displayName=w;var fe="AlertDialogAction",S=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...o}=a,s=i(t);return(0,r.jsx)(D,{...s,...o,ref:e})});S.displayName=fe;var E="AlertDialogCancel",T=l.forwardRef((a,e)=>{const{__scopeAlertDialog:t,...o}=a,{cancelRef:s}=ge(E,t),p=i(t),c=A(e,s);return(0,r.jsx)(D,{...p,...o,ref:c})});T.displayName=E;var ue=({contentRef:a})=>{const e=`\`${d}\` requires a description for the component to be accessible for screen reader users. 2 3You can add a description to the \`${d}\` by passing a \`${w}\` 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 \`${d}\`. 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 l.useEffect(()=>{document.getElementById(a.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,a]),null},ve=y;var Ae=_,P=j,O=h,$=S,I=T,M=R,F=C,De=ve;var xe=Ae,L=l.forwardRef(({className:a,...e},t)=>(0,r.jsx)(P,{className:n("fixed inset-0 z-[70] bg-black/70 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}));L.displayName=P.displayName;var k=l.forwardRef(({className:a,...e},t)=>(0,r.jsxs)(xe,{children:[(0,r.jsx)(L,{}),(0,r.jsx)(O,{ref:t,className:n("fixed left-[50%] top-[50%] z-[70] grid w-[calc(100%-2rem)] sm:w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border-strong bg-background p-6 shadow-[var(--shadow-edge),var(--shadow-xl)] duration-200 overscroll-contain 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%] rounded-xl",a),...e})]}));k.displayName=O.displayName;var z=({className:a,...e})=>(0,r.jsx)("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",a),...e});z.displayName="AlertDialogHeader";var q=({className:a,...e})=>(0,r.jsx)("div",{className:n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...e});q.displayName="AlertDialogFooter";var B=l.forwardRef(({className:a,...e},t)=>(0,r.jsx)(M,{ref:t,className:n("text-lg font-semibold",a),...e}));B.displayName=M.displayName;var G=l.forwardRef(({className:a,...e},t)=>(0,r.jsx)(F,{ref:t,className:n("text-sm text-muted-foreground",a),...e}));G.displayName=F.displayName;var H=l.forwardRef(({className:a,...e},t)=>(0,r.jsx)($,{ref:t,className:n(v(),a),...e}));H.displayName=$.displayName;var V=l.forwardRef(({className:a,...e},t)=>(0,r.jsx)(I,{ref:t,className:n(v({variant:"outline"}),"mt-2 sm:mt-0",a),...e}));V.displayName=I.displayName;const Te=({open:a,title:e,description:t,confirmText:o,cancelText:s,variant:p,onConfirm:c,onCancel:m})=>(0,r.jsx)(De,{open:a,onOpenChange:f=>!f&&m(),children:(0,r.jsxs)(k,{children:[(0,r.jsxs)(z,{children:[(0,r.jsx)(B,{children:e}),(0,r.jsx)(G,{children:t})]}),(0,r.jsxs)(q,{children:[(0,r.jsx)(V,{onClick:m,children:s}),(0,r.jsx)(H,{onClick:c,className:p==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"",children:o})]})]})});export{Te as ConfirmDialogBody};
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.