1import{_ as C,a as R,b as N}from"./B4REo7kE.js";import{h as T,r as b,D as y,y as _,j as B,E,s as L,$ as D,m as O,_ as k,x as I,c as M,w as d,o as A,d as h,t as m,f as u,g as o,F as V,z as v,B as q}from"./AOIjoq-2.js";import{_ as U}from"./BasleHJ7.js";import"./DH0OkRbw.js";const j=T("forgot-password",()=>{const f=b({email:""}),g=b({email:["notEmpty","email"]}),s=b(!1);return{forgotPasswordFormFields:f,forgotPasswordFormFieldRules:g,forgotPasswordFormSubmitted:s,submitForgotPasswordForm:async()=>{const p=y(),{customerType:n}=_(p),{$i18n:e,$dsc:r}=B();try{s.value=!0;const{email:t}=f.value,l=n.value,{host:i}=E(),P=e.locales.value.find(F=>F.domain?.includes(i))?.code??e.defaultLocale,[,c]=P.split("-"),w=l===L.B2B?c==="FI"?"MONTE_CARLO_FI":"MONTE_CARLO_SE":"MINA_SIDOR";await D("api/v2/forgot-password",{body:{email:t,relation:l,country:c,portal:w}}),O.gtm({event:"password_reset_request",event_function:"debug",method:"log_in_with_email",logged_in_status:"logged_out"}),r.msg.success(`${e.t("messages.forgot-password-prefix")} ${t} ${e.t("messages.forgot-password-suffix")}`)}catch(t){r.msg.error("messages.something-went-wrong",t)}finally{s.value=!1}}}}),z={class:"h4 text-center"},Y={class:"text-body text-center"},G={__name:"forgot-password",setup(f){const g=I(),s=j(),S=y(),{introFormFields:p}=_(g),{forgotPasswordFormFields:n,forgotPasswordFormFieldRules:e,forgotPasswordFormSubmitted:r}=_(s),{submitForgotPasswordForm:t}=s,{customerType:l}=_(S),{email:i=""}=p.value;return i.length&&s.$patch({forgotPasswordFormFields:{email:i}}),(a,P)=>{const c=R,w=N,F=q,$=C,x=U;return A(),M(x,{class:"forgot-password boxed"},{default:d(()=>[h("h4",z,m(a.$t("forgotPassword.title")),1),h("p",Y,m(a.$t("forgotPassword.body")),1),u($,{"model-value":o(n),rules:o(e),onSubmit:o(t)},{default:d(()=>[u(c,{id:"email",name:"email",type:"text",label:a.$t("forgotPassword.emailFieldLabel")},null,8,["label"]),u(w,{class:"submit ds-btn primary full large text-uppercase",busy:o(r),disabled:!o(n).email.length||o(r),type:"submit",onClick:V(o(t),["prevent"])},{default:d(()=>[v(m(a.$t("forgotPassword.buttons.submit")),1)]),_:1},8,["busy","disabled","onClick"]),u(F,{class:"ds-btn flush full",to:`/?service${o(l)}`},{default:d(()=>[v(m(a.$t("forgotPassword.buttons.login")),1)]),_:1},8,["to"])]),_:1},8,["model-value","rules","onSubmit"])]),_:1})}}},W=k(G,[["__scopeId","data-v-77149252"]]);export{W 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.