import"./rolldown-runtime-DIIn1E2Q.js";import{rt as e,st as t}from"./vendor-primevue-BDZ_jj__.js";import"./vendor-firebase-D7u00oy9.js";import{A as n,F as r,I as i,O as a,R as o,Rt as s,Ut as c,_t as l,b as u,et as d,j as f,k as p,kt as m,o as h}from"./vendor-vue-core-DO0afONr.js";import"./vendor-other-CiPV8GBG.js";import"./useFeatureFlags-CeS8LuDc.js";import"./api-Cw7jP9TY.js";import"./vendor-markdown-Da9QPS2x.js";import"./colorUtil-Bsa2N3Sq.js";import{n as g}from"./vendor-i18n-JbyM4Qz7.js";import"./i18n-CF_88JEG.js";import"./vendor-reka-ui-B53kLmAc.js";import{t as _}from"./Button-Ca3rDegY.js";import{ji as v}from"./dialogService-CfgsFapJ.js";import"./formatUtil-CeKPWstn.js";import"./dialogStore-G2juoay4.js";import"./userStore-Czt6jT20.js";import"./useErrorHandling-DXaBpHI1.js";import"./extensionStore-MnMxnUwx.js";import{t as y}from"./_plugin-vue_export-helper-Wc9cjhKh.js";import"./useExternalLink-BItqlDxr.js";import"./vendor-tiptap-Bk1lVUYZ.js";import"./markdownRendererUtil-_EbNpPBW.js";import"./Popover-CXKWNrM3.js";import"./electronDownloadStore-DudKQmD7.js";var b={class:`flex h-full items-center justify-center p-8`},x={class:`max-w-[100vw] p-2 lg:w-96`},S={class:`mb-8 flex flex-col gap-4`},C={class:`my-0 text-xl/normal font-medium`},w={class:`my-0 text-base text-muted`},T={class:`flex flex-col gap-2`},E={class:`mb-2 text-base font-medium opacity-80`,for:`reset-email`},D={key:0,class:`text-red-500`},O={class:`flex flex-col gap-4`},k={class:`mt-5 text-sm text-gray-600`},A=y(o({__name:`CloudForgotPasswordView`,setup(o){let{t:y}=g(),A=h(),j=v(),M=m(``),N=m(!1),P=m(``),F=m(``),navigateToLogin=()=>{A.push({name:`cloud-login`})},handleSubmit=async()=>{if(!M.value){P.value=y(`cloudForgotPassword_emailRequired`);return}N.value=!0,P.value=``,F.value=``;try{await j.sendPasswordReset(M.value),F.value=y(`cloudForgotPassword_passwordResetSent`),setTimeout(()=>{navigateToLogin()},3e3)}catch(e){console.error(`Password reset error:`,e),P.value=y(`cloudForgotPassword_passwordResetError`)}finally{N.value=!1}};return(o,m)=>(d(),f(`div`,b,[a(`div`,x,[a(`div`,S,[a(`h1`,C,c(s(y)(`cloudForgotPassword_title`)),1),a(`p`,w,c(s(y)(`cloudForgotPassword_instructions`)),1)]),a(`form`,{class:`flex flex-col gap-6`,onSubmit:u(handleSubmit,[`prevent`])},[a(`div`,T,[a(`label`,E,c(s(y)(`cloudForgotPassword_emailLabel`)),1),i(s(e),{id:`reset-email`,modelValue:M.value,"onUpdate:modelValue":m[0]||=e=>M.value=e,type:`email`,placeholder:s(y)(`cloudForgotPassword_emailPlaceholder`),class:`h-10`,invalid:!!P.value&&!M.value,autocomplete:`email`,required:``},null,8,[`modelValue`,`placeholder`,`invalid`]),P.value?(d(),f(`small`,D,c(P.value),1)):n(``,!0)]),F.value?(d(),p(s(t),{key:0,severity:`success`},{default:l(()=>[r(c(F.value),1)]),_:1})):n(``,!0),a(`div`,O,[i(_,{type:`submit`,loading:N.value,disabled:!M.value||N.value,class:`h-10 font-medium text-white`},{default:l(()=>[r(c(s(y)(`cloudForgotPassword_sendResetLink`)),1)]),_:1},8,[`loading`,`disabled`]),i(_,{type:`button`,variant:`secondary`,class:`h-10 bg-charcoal-500`,onClick:navigateToLogin},{default:l(()=>[r(c(s(y)(`cloudForgotPassword_backToLogin`)),1)]),_:1})])],32),a(`p`,k,c(s(y)(`cloudForgotPassword_didntReceiveEmail`)),1)])]))}}),[[`__scopeId`,`data-v-2fda1d90`]]);export{A as default};
//# sourceMappingURL=CloudForgotPasswordView-C7uukapR.js.map