import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{ct as t,rt as n}from"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as r,A as i,Bt as a,D as o,Et as s,F as c,Ft as l,L as u,O as d,P as f,ht as p,k as m,o as h,y as g}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import{n as _}from"./vendor-i18n-CsAN_zFP.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import{t as v}from"./Button-mG8zDgxj.js";import{wn as y}from"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import{t as b}from"./_plugin-vue_export-helper-CTPoQIH5.js";import"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";var x={class:`flex h-full items-center justify-center p-8`},S={class:`max-w-[100vw] p-2 lg:w-96`},C={class:`mb-8 flex flex-col gap-4`},w={class:`my-0 text-xl leading-normal font-medium`},T={class:`my-0 text-base text-muted`},E={class:`flex flex-col gap-2`},D={class:`mb-2 text-base font-medium opacity-80`,for:`reset-email`},O={key:0,class:`text-red-500`},k={class:`flex flex-col gap-4`},A={class:`mt-5 text-sm text-gray-600`},j=b(u({__name:`CloudForgotPasswordView`,setup(e){let{t:u}=_(),b=h(),j=y(),M=s(``),N=s(!1),P=s(``),F=s(``),navigateToLogin=()=>{b.push({name:`cloud-login`})},handleSubmit=async()=>{if(!M.value){P.value=u(`cloudForgotPassword_emailRequired`);return}N.value=!0,P.value=``,F.value=``;try{await j.sendPasswordReset(M.value),F.value=u(`cloudForgotPassword_passwordResetSent`),setTimeout(()=>{navigateToLogin()},3e3)}catch(e){console.error(`Password reset error:`,e),P.value=u(`cloudForgotPassword_passwordResetError`)}finally{N.value=!1}};return(e,s)=>(r(),i(`div`,x,[o(`div`,S,[o(`div`,C,[o(`h1`,w,a(l(u)(`cloudForgotPassword_title`)),1),o(`p`,T,a(l(u)(`cloudForgotPassword_instructions`)),1)]),o(`form`,{class:`flex flex-col gap-6`,onSubmit:g(handleSubmit,[`prevent`])},[o(`div`,E,[o(`label`,D,a(l(u)(`cloudForgotPassword_emailLabel`)),1),c(l(n),{id:`reset-email`,modelValue:M.value,"onUpdate:modelValue":s[0]||=e=>M.value=e,type:`email`,placeholder:l(u)(`cloudForgotPassword_emailPlaceholder`),class:`h-10`,invalid:!!P.value&&!M.value,autocomplete:`email`,required:``},null,8,[`modelValue`,`placeholder`,`invalid`]),P.value?(r(),i(`small`,O,a(P.value),1)):m(``,!0)]),F.value?(r(),d(l(t),{key:0,severity:`success`},{default:p(()=>[f(a(F.value),1)]),_:1})):m(``,!0),o(`div`,k,[c(v,{type:`submit`,loading:N.value,disabled:!M.value||N.value,class:`h-10 font-medium text-white`},{default:p(()=>[f(a(l(u)(`cloudForgotPassword_sendResetLink`)),1)]),_:1},8,[`loading`,`disabled`]),c(v,{type:`button`,variant:`secondary`,class:`h-10 bg-[#2d2e32]`,onClick:navigateToLogin},{default:p(()=>[f(a(l(u)(`cloudForgotPassword_backToLogin`)),1)]),_:1})])],32),o(`p`,A,a(l(u)(`cloudForgotPassword_didntReceiveEmail`)),1)])]))}}),[[`__scopeId`,`data-v-127dc072`]]);export{j as default};
//# sourceMappingURL=CloudForgotPasswordView-DY8qZnD3.js.map