import{r as c,j as e}from"./@radix-C7hRs6Kx.js";import{t as x}from"./zod-C0xYeTvL.js";import{as as f,aI as p,at as u,I as h,aJ as j,av as D,h as a,m as E,z as r}from"./index-D2iSHVZq.js";import{u as g}from"./index.esm-D7jFlf5N.js";const y=r.object({delete:r.string()}).refine(t=>t.delete==="DELETE",{message:"Please type DELETE to confirm"}),A=c.forwardRef(({handleDelete:t,title:s,children:l},n)=>{const{register:o,handleSubmit:i,formState:{isValid:m}}=g({resolver:x(y),defaultValues:{delete:""}});return e.jsxs(f,{ref:n,children:[e.jsx(p,{children:e.jsx(u,{children:s})}),e.jsxs("form",{onSubmit:i(()=>t()),id:"delete-form",className:"space-y-5 p-5",children:[l,e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"mb-0.5 text-text-sm",children:"Please type DELETE to confirm"}),e.jsx(h,{onPaste:d=>d.preventDefault(),...o("delete"),className:"w-full"})]})]}),e.jsxs(j,{className:"gap-[10px]",children:[e.jsx(D,{asChild:!0,children:e.jsx(a,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(a,{form:"delete-form",disabled:!m,intent:"danger",type:"submit",children:"Delete"})]})]})});A.displayName="DeleteAlertContent";function S({children:t,className:s}){return e.jsx("div",{className:E("text-text-md text-theme-text-secondary",s),children:t})}export{A as D,S as a};
