import{j as e}from"./@radix-D8tIKeo-.js";import{u as x,t as f,z as a}from"./@zod-2qqdh1cM.js";import{a as p}from"./@monaco-editor-CuNQBT0l.js";import{ab as u,ac as j,ad as h,I as D,af as g,ag as E,B as l,c as y}from"./index-B44sgOyQ.js";const b=a.object({delete:a.string()}).refine(t=>t.delete==="DELETE",{message:"Please type DELETE to confirm"}),A=p.forwardRef(({handleDelete:t,title:s,children:r,isPending:n},o)=>{const{register:i,handleSubmit:d,formState:{isValid:m}}=x({resolver:f(b),defaultValues:{delete:""}});return e.jsxs(u,{ref:o,children:[e.jsx(j,{children:e.jsx(h,{children:s})}),e.jsxs("form",{onSubmit:d(()=>t()),id:"delete-form",className:"space-y-5 p-5",children:[r,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(D,{onPaste:c=>c.preventDefault(),...i("delete"),className:"w-full"})]})]}),e.jsxs(g,{className:"gap-[10px]",children:[e.jsx(E,{asChild:!0,children:e.jsx(l,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(l,{form:"delete-form",disabled:!m||n,intent:"danger",type:"submit",children:"Delete"})]})]})});A.displayName="DeleteAlertContent";function T({children:t,className:s}){return e.jsx("div",{className:y("text-text-md text-theme-text-secondary",s),children:t})}export{A as D,T as a};
