1import{a as t,_ as e,b as c}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B177jzqY.js";import{_ as w}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_router_mf_2_dom__loadShare__.js-CK4j7iSY.js";import{V as k}from"./ViewTitle-DlDMKMwm.js";import{S as p}from"./types-BY9I4-Vb.js";import{F as u,T as N,A as h,a as v,b as f}from"./AuthForm-COFDG1pF.js";import{u as F}from"./useEmailActionForm-DFPrANay.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-D_fXcg40.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js-ClGO9exV.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-ckyQG2Wp.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-BYnSnx8j.js";import"./index-CwMG8eoe.js";import"./index-C8DIms-h.js";import"./virtualExposes-_ivNhQLP.js";import"./remoteEntry-uboCqDRT.js";import"./preload-helper-s0Msbe4-.js";import"./index-DM2295YJ.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-_fD68H2V.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare___mf_0_unleash_mf_1_proxy_mf_2_client_mf_2_react__loadShare__.js-BdtqsXmB.js";import"./input-BAKHZGps.js";import"./useControlled-DMkbsAxB.js";import"./useRegisterFieldControl-B2c9p962.js";import"./GradientOutlineButton-B8oUDodB.js";import"./index.esm-DUFkhrqd.js";import"./RequiredParameter-sNXTeMLJ.js";const S="https://support.photobucket.com/hc/en-us/categories/4404271347732-Account-Recovery";function Q(){var m,d;const s=w(),g=(m=s.state)==null?void 0:m.email,{fields:r,alerts:a,screenPhase:n,isAttemptingToSend:o,handleChange:x,resetState:b,sendLink:l}=F({initialEmail:g,errorNoun:i=>i==="login"?"magic link":"password reset"}),_=i=>{i.preventDefault(),l("resetPassword")};return t("div",{className:"flex flex-col gap-24",children:[e(k,{title:"Forgot Password"}),n===p.FORM&&t(c,{children:[t("div",{className:"flex flex-col gap-8",children:[e("h1",{className:"font-display text-foreground text-4xl font-bold",children:"Forgot your password?"}),e("p",{className:"text-muted-foreground text-base",children:"Enter the email on your account and we will send you a password reset link."})]}),a.error&&t(u,{variant:"error",children:[e("span",{className:"font-semibold",children:"Failed to send link"}),e("br",{}),a.error]}),t("form",{className:"flex flex-col gap-24",onSubmit:_,children:[e(N,{label:"Email/Username",id:"username",name:"email","data-test":"username",type:"text",placeholder:"[email protected]",autoFocus:!0,autoCapitalize:"off",required:!0,disabled:o,error:a.email,value:r.email||"",onChange:x}),e(h,{type:"submit",name:"resetPassword","data-test":"submit",disabled:o,children:"Reset Password"})]}),t("div",{className:"flex flex-col items-center gap-24",children:[e(v,{id:"loginLink",type:"button","data-testid":"send-link",onClick:()=>l("login"),disabled:o,children:"Send me a magic link"}),e(f,{"data-test":"return-to-login",to:"/auth/login".concat(s.search),children:"Return to Login"})]})]}),n===p.EMAIL_SENT&&t(c,{children:[e("h1",{className:"font-display text-foreground text-4xl font-bold",children:"Email Sent"}),e(u,{variant:"success",className:"break-words",children:(d=r.email)!=null&&d.includes("@")?"We've sent an email to ".concat(r.email,"."):"We've sent an email to the address associated with ".concat(r.email,".")}),e(h,{name:"forgot-password-try-again",onClick:b,children:"Send another email"}),t("p",{className:"text-muted-foreground text-sm",children:["Having trouble?"," ",e(f,{href:S,target:"_blank",rel:"noopener noreferrer",children:"Visit help center"})]})]})]})}export{Q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.