import{ct as p,cL as _,X as v,cS as e,p as V,bB as g,a3 as t,a2 as s,c0 as o,c7 as h,W as r,V as c,bj as b,bO as $}from"#entry";import{V as y,b as C}from"./RTCSF0Ks.js";import{V as T}from"./R1_j74h_.js";import{V as k}from"./CAodMEV_.js";import{V as w}from"./C8MHOe0D.js";import"./BgQ5eU58.js";import"./BKDgfSxC.js";import"./Cp3UUybv.js";const B={class:"text-h6 mb-4"},S={class:"text-h6 mb-4 text-error"},x={class:"mb-3"},X={__name:"settings",setup(N){const n=$(!1),{$confirm:l,$notify:m}=p(),{user:i,clear:d}=_();async function u(){n.value=!0,await $fetch("/api/user/recover",{method:"POST",body:{email:i.value.email}}),n.value=!1,m("login.check_email")}async function f(){await l("settings.remove_account_confirm")&&($fetch("/api/user",{method:"DELETE"}),d(),b("/"))}return(a,A)=>(g(),v(V,null,{default:e(()=>[t(y,null,{default:e(()=>[t(C,{class:"mb-4"},{default:e(()=>[s(o(h(i).email),1)]),_:1}),t(T,null,{default:e(()=>[r("div",B,o(a.$t("login.forgot_password")),1),t(c,{variant:"outlined","prepend-icon":"mdi-email-outline",onClick:u},{default:e(()=>[s(o(a.$t("common.recover_password")),1)]),_:1}),t(k,{class:"my-6"}),r("div",S,o(a.$t("settings.danger_section")),1),t(w,{type:"error",icon:!1,border:!1,rounded:""},{default:e(()=>[r("div",x,o(a.$t("settings.remove_account")),1),t(c,{variant:"outlined",color:"error",onClick:f},{default:e(()=>[s(o(a.$t("common.remove")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}};export{X as default};
