import{At as e,C as t,D as n,E as r,G as i,H as a,P as o,T as s,b as c,ft as l,i as u,nt as d,p as f,xt as p,yt as m}from"./app-r2SMcdpu.js";import{t as h}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as g,r as _,t as v}from"./TextInput-IAw8Ne2B.js";import{t as y}from"./Modal-Ct8uB0ps.js";var b={},x={class:`inline-flex items-center rounded-md border border-transparent bg-red-600 px-4 py-2 text-xs font-semibold uppercase tracking-widest text-white transition duration-150 ease-in-out hover:bg-red-500 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 active:bg-red-700 dark:focus:ring-offset-gray-800`};function S(e,n){return a(),t(`button`,x,[i(e.$slots,`default`)])}var C=h(b,[[`render`,S]]),w=[`type`],T=n({__name:`SecondaryButton`,props:{type:{default:`button`}},setup(e){return(n,r)=>(a(),t(`button`,{type:e.type,class:`inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-xs font-semibold uppercase tracking-widest text-gray-700 shadow-sm transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 disabled:opacity-25 dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-offset-gray-800`},[i(n.$slots,`default`)],8,w))}}),E={class:`space-y-6`},D={class:`p-6`},O={class:`mt-6`},k={class:`mt-6 flex justify-end`},A=n({__name:`DeleteUserForm`,setup(e){let n=l(!1),i=l(null),h=u({password:``}),b=()=>{n.value=!0,o(()=>i.value?.focus())},x=()=>{h.delete(route(`profile.destroy`),{preserveScroll:!0,onSuccess:()=>S(),onError:()=>i.value?.focus(),onFinish:()=>{h.reset()}})},S=()=>{n.value=!1,h.clearErrors(),h.reset()};return(e,o)=>(a(),t(`section`,E,[o[6]||=c(`header`,null,[c(`h2`,{class:`text-lg font-medium text-gray-900 dark:text-gray-100`},` Delete Account `),c(`p`,{class:`mt-1 text-sm text-gray-600 dark:text-gray-400`},` Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain. `)],-1),r(C,{onClick:b},{default:d(()=>[...o[1]||=[s(`Delete Account`,-1)]]),_:1}),r(y,{show:n.value,onClose:S},{default:d(()=>[c(`div`,D,[o[4]||=c(`h2`,{class:`text-lg font-medium text-gray-900 dark:text-gray-100`},` Are you sure you want to delete your account? `,-1),o[5]||=c(`p`,{class:`mt-1 text-sm text-gray-600 dark:text-gray-400`},` 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),c(`div`,O,[r(g,{for:`password`,value:`Password`,class:`sr-only`}),r(v,{id:`password`,ref_key:`passwordInput`,ref:i,modelValue:m(h).password,"onUpdate:modelValue":o[0]||=e=>m(h).password=e,type:`password`,class:`mt-1 block w-3/4`,placeholder:`Password`,onKeyup:f(x,[`enter`])},null,8,[`modelValue`]),r(_,{message:m(h).errors.password,class:`mt-2`},null,8,[`message`])]),c(`div`,k,[r(T,{onClick:S},{default:d(()=>[...o[2]||=[s(` Cancel `,-1)]]),_:1}),r(C,{class:p([`ms-3`,{"opacity-25":m(h).processing}]),disabled:m(h).processing,onClick:x},{default:d(()=>[...o[3]||=[s(` Delete Account `,-1)]]),_:1},8,[`class`,`disabled`])])])]),_:1},8,[`show`])]))}}),j=e({default:()=>M}),M=A;export{j as n,M as t};