import{s as u,y as f,o as y,c as w,a as o,w as t,d as s,S as h,b as c,u as a,V as x,n as g}from"./app-I4K73wff.js";import{_ as m,a as v}from"./Modal-2XNj_mQu.js";import{_ as k}from"./InputError-H3v_qTU0.js";import{_ as C}from"./InputLabel-kIOW7zCm.js";import{_ as V}from"./SecondaryButton-KuZEOqaa.js";import{_ as B}from"./TextInput-QqzhSxrA.js";const U={class:"space-y-6"},$=s("header",null,[s("h2",{class:"text-lg font-medium text-gray-900"},"Borrar cuenta"),s("p",{class:"mt-1 text-sm text-gray-600"}," Una vez que se elimine su cuenta, todos sus recursos y datos se eliminarán permanentemente. Antes de eliminar su cuenta, descargue cualquier dato o información que desee conservar. ")],-1),b={class:"p-6"},q=s("h2",{class:"text-lg font-medium text-gray-900"}," Are you sure you want to delete your account? ",-1),D=s("p",{class:"mt-1 text-sm text-gray-600"}," Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account. ",-1),N={class:"mt-6"},P={class:"mt-6 flex justify-end"},j={__name:"DeleteUserForm",setup(S){const r=u(!1),n=u(null),e=f({password:""}),_=()=>{r.value=!0,h(()=>n.value.focus())},d=()=>{e.delete(route("profile.destroy"),{preserveScroll:!0,onSuccess:()=>l(),onError:()=>n.value.focus(),onFinish:()=>e.reset()})},l=()=>{r.value=!1,e.reset()};return(T,i)=>(y(),w("section",U,[$,o(m,{onClick:_},{default:t(()=>[c("Borrar cuenta")]),_:1}),o(v,{show:r.value,onClose:l},{default:t(()=>[s("div",b,[q,D,s("div",N,[o(C,{for:"password",value:"Password",class:"sr-only"}),o(B,{id:"password",ref_key:"passwordInput",ref:n,modelValue:a(e).password,"onUpdate:modelValue":i[0]||(i[0]=p=>a(e).password=p),type:"password",class:"mt-1 block w-3/4",placeholder:"Password",onKeyup:x(d,["enter"])},null,8,["modelValue"]),o(k,{message:a(e).errors.password,class:"mt-2"},null,8,["message"])]),s("div",P,[o(V,{onClick:l},{default:t(()=>[c(" Cancel ")]),_:1}),o(m,{class:g(["ms-3",{"opacity-25":a(e).processing}]),disabled:a(e).processing,onClick:d},{default:t(()=>[c(" Borrar cuenta ")]),_:1},8,["class","disabled"])])])]),_:1},8,["show"])]))}};export{j as default};
