1import{w as S}from"./runtime-dom.esm-bundler.hR_rE5am.js";import{t as i}from"./translate.C4wggBpu.js";import{_ as d}from"./InputField.vue_vue_type_script_setup_true_lang.DzLGia64.js";import{a as g,f as b,b as k}from"./useProfileApi.BbSHL9GU.js";import{H as _}from"./convertToUrlSearchParams.D6QR1eDk.js";import{J as E,K as p,L as w,O as P,P as $,S as c,k as u,W as m,Q as q}from"./runtime-core.esm-bundler.B6keTsmA.js";import"./index.D_5av9BF.js";const B={class:"grid gap-y-4"},C={type:"submit",class:"f-btn f-btn--primary w-full rounded-full uppercase mt-8"},T=E({__name:"RestorePasswordForm",props:{token:{type:String,default:null},email:{type:String,default:null}},setup(v){const f=v,a=p(f.email),s=p(null),n=p(null),l=w({isSending:!1}),t=w({}),{post:y}=k(),V=async()=>{if(!l.isSending){l.isSending=!0;try{const o=await y(g.resetPassword,{},{json:{token:f.token,email:a.value,password:s.value,password_confirmation:n.value}});window.location=o==null?void 0:o.redirect_to}catch(o){if(o instanceof _&&o.response.status===422){const e=await o.response.json();b(t,e.errors)}}finally{l.isSending=!1}}};return(o,e)=>(P(),$("form",{onSubmit:S(V,["prevent"])},[c("div",B,[u(d,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=r=>a.value=r),name:"email",error:t.email,type:"email",placeholder:"Email",required:!0,onInput:e[1]||(e[1]=r=>delete t.email)},null,8,["modelValue","error"]),u(d,{modelValue:s.value,"onUpdate:modelValue":e[2]||(e[2]=r=>s.value=r),name:"password",error:t.password,type:"password",placeholder:m(i)("Ðовий паÑолÑ"),required:!0,onInput:e[3]||(e[3]=r=>delete t.password)},null,8,["modelValue","error","placeholder"]),u(d,{modelValue:n.value,"onUpdate:modelValue":e[4]||(e[4]=r=>n.value=r),name:"password_confirmation",error:t.password_confirmation,type:"password",placeholder:m(i)("ÐÑдÑвеÑдиÑи паÑолÑ"),required:!0,onInput:e[5]||(e[5]=r=>delete t.password_confirmation)},null,8,["modelValue","error","placeholder"])]),c("button",C,q(m(i)("ÐÑдновиÑи паÑолÑ")),1)],32))}});export{T 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.