import{Y as p,a5 as _,A as v,B as e,C as V,E as g,b as t,G as s,Q as o,S as h,c as r,V as c,$,a4 as C}from"#entry";import{V as b,a as y}from"./DlybGOWB.js";import{V as T}from"./DArAxlee.js";import{V as k}from"./CZqgYEd3.js";import{V as w}from"./C63UuyGC.js";import"./DSnRMG2T.js";import"./BML-0xFj.js";import"./CIr4U5gS.js";const B={class:"text-h6 mb-4"},S={class:"text-h6 mb-4 text-error"},x={class:"mb-3"},Y={__name:"settings",setup(A){const n=C(!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(),$("/"))}return(a,E)=>(g(),v(V,null,{default:e(()=>[t(b,null,{default:e(()=>[t(y,{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{Y as default};
