import{j as l,a as f}from"./jsx-runtime-5BUNAZ9W.js";import{c as n}from"./cn-466VSCev.js";import{_ as s}from"./index-VfKohXEB.js";import{r as o}from"./index-4g5l5LRQ.js";import{$ as V}from"./index-tktZLsKA.js";import{$ as _,c as q}from"./index-dNGI4_9C.js";import{h as y,$ as G,a as J,i as K,b as Q,d as U,e as W,c as N,f as X,g as Y}from"./index-qX7SgqCB.js";import{$ as Z}from"./index-pbeB-vsG.js";import{b as v,B as ee}from"./button-N5G3CLUW.js";import"./extends-dGVwEr9R.js";import"./index-zaNpaTzt.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-gUvWXRra.js";import"./index-gxNcLOY3.js";import"./index-nyvS1vus.js";import"./index-TrPPXL0M.js";import"./index-VGGqXfCL.js";import"./index-rFlDZKmw.js";import"./index-r79zT-RW.js";import"./index-polp_dyw.js";import"./createLucideIcon-SOGh5HrW.js";const ae="AlertDialog",[te,Me]=V(ae,[y]),i=y(),oe=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.createElement(X,s({},r,t,{modal:!0}))},re=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,c=i(t);return o.createElement(Y,s({},c,r,{ref:a}))}),le=e=>{const{__scopeAlertDialog:a,...t}=e,r=i(a);return o.createElement(G,s({},r,t))},ce=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,c=i(t);return o.createElement(J,s({},c,r,{ref:a}))}),h="AlertDialogContent",[ne,se]=te(h),ie=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,children:r,...c}=e,m=i(t),g=o.useRef(null),L=_(a,g),u=o.useRef(null);return o.createElement(K,{contentName:h,titleName:de,docsSlug:"alert-dialog"},o.createElement(ne,{scope:t,cancelRef:u},o.createElement(Q,s({role:"alertdialog"},m,c,{ref:L,onOpenAutoFocus:Z(c.onOpenAutoFocus,d=>{var b;d.preventDefault(),(b=u.current)===null||b===void 0||b.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault()}),o.createElement(q,null,r),!1)))}),de="AlertDialogTitle",fe=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,c=i(t);return o.createElement(U,s({},c,r,{ref:a}))}),pe=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,c=i(t);return o.createElement(W,s({},c,r,{ref:a}))}),$e=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,c=i(t);return o.createElement(N,s({},c,r,{ref:a}))}),me="AlertDialogCancel",ge=o.forwardRef((e,a)=>{const{__scopeAlertDialog:t,...r}=e,{cancelRef:c}=se(me,t),m=i(t),g=_(a,c);return o.createElement(N,s({},m,r,{ref:g}))}),be=oe,ue=re,R=le,w=ce,C=ie,E=$e,T=ge,S=fe,P=pe,O=be,Ae=ue,B=({className:e,...a})=>l(R,{className:n(e),...a});B.displayName=R.displayName;const F=o.forwardRef(({className:e,children:a,...t},r)=>l(w,{className:n("fixed inset-0 z-50 bg-background-overlay backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));F.displayName=w.displayName;const H=o.forwardRef(({className:e,...a},t)=>f(B,{children:[l(F,{}),l(C,{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 md:w-full",e),...a})]}));H.displayName=C.displayName;const $=({className:e,...a})=>l("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...a});$.displayName="AlertDialogHeader";const j=({className:e,...a})=>l("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});j.displayName="AlertDialogFooter";const k=o.forwardRef(({className:e,...a},t)=>l(S,{ref:t,className:n("text-lg text-text font-semibold",e),...a}));k.displayName=S.displayName;const z=o.forwardRef(({className:e,...a},t)=>l(P,{ref:t,className:n("text-sm text-text-weak",e),...a}));z.displayName=P.displayName;const M=o.forwardRef(({className:e,...a},t)=>l(E,{ref:t,className:n(v(),e),...a}));M.displayName=E.displayName;const I=o.forwardRef(({className:e,...a},t)=>l(T,{ref:t,className:n(v({variant:"outline"}),"mt-2 sm:mt-0",e),...a}));I.displayName=T.displayName;try{$.displayName="AlertDialogHeader",$.__docgenInfo={description:"",displayName:"AlertDialogHeader",props:{}}}catch{}const Ie={title:"ui/AlertDialog",component:O,tags:["autodocs"],argTypes:{}},p={render:()=>f(O,{children:[l(Ae,{asChild:!0,children:l(ee,{variant:"outline",children:"Open"})}),f(H,{children:[f($,{children:[l(k,{children:"Are you sure absolutely sure?"}),l(z,{children:"This action cannot be undone. This will permanently delete your account and remove your data from our servers."})]}),f(j,{children:[l(I,{children:"Cancel"}),l(M,{children:"Continue"})]})]})]}),args:{}};var A,D,x;p.parameters={...p.parameters,docs:{...(A=p.parameters)==null?void 0:A.docs,source:{originalSource:`{
  render: () => <AlertDialog>
      <AlertDialogTrigger asChild>
        <Button variant="outline">Open</Button>
      </AlertDialogTrigger>
      <AlertDialogContent>
        <AlertDialogHeader>
          <AlertDialogTitle>Are you sure absolutely sure?</AlertDialogTitle>
          <AlertDialogDescription>
            This action cannot be undone. This will permanently delete your
            account and remove your data from our servers.
          </AlertDialogDescription>
        </AlertDialogHeader>
        <AlertDialogFooter>
          <AlertDialogCancel>Cancel</AlertDialogCancel>
          <AlertDialogAction>Continue</AlertDialogAction>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>,
  args: {}
}`,...(x=(D=p.parameters)==null?void 0:D.docs)==null?void 0:x.source}}};const Le=["Base"];export{p as Base,Le as __namedExportsOrder,Ie as default};
