function e(e){app.store.title=`Forgotten superuser password`;let n=store({email:``,isSubmitting:!1,success:!1});async function r(){if(!n.isSubmitting){n.isSubmitting=!0;try{await app.pb.collection(`_superusers`).requestPasswordReset(n.email),n.success=!0}catch(e){app.checkApiError(e)}n.isSubmitting=!1}}return t.div({pbEvent:`pageSuperuserPasswordReset`,className:`wrapper sm m-auto p-b-base`},t.header({className:`txt-center m-b-base`},t.img({className:`main-logo`,src:()=>app.store.mainLogo,ariaHidden:!0,alt:`App logo`}),t.h5({className:`m-t-10`},()=>app.store.title)),()=>n.success?t.div({pbEvent:`superuserPasswordResetAlert`,className:`alert success txt-center`},t.p(null,`Check `,t.strong(null,n.email),` for the recovery link!`)):t.form({pbEvent:`superuserPasswordResetForm`,className:`grid request-password-reset-form`,onsubmit:e=>{e.preventDefault(),r()}},t.div({className:`col-12`},t.div({className:`content txt-center m-b-sm`},t.p(null,`Enter the email associated with your account and we'll send you a recovery link:`)),t.div({className:`field`},t.label({htmlFor:`password_reset_email`},`Email`),t.input({id:`password_reset_email`,name:`email`,type:`email`,required:!0,autofocus:!0,value:()=>n.email,oninput:e=>n.email=e.target.value}))),t.div({className:`col-12`},t.button({className:()=>`btn lg block ${n.isSubmitting?`loading`:``}`,disabled:()=>n.isSubmitting},t.i({className:`ri-mail-send-line`,ariaHidden:!0}),t.span({className:`txt`},`Send recovery link`)))),t.div({className:`block m-t-sm txt-center`},t.a({href:`#/login`,className:`link-hint`},`Back to login`)))}export{e as pageRequestSuperuserPasswordReset};