1import{d as F,b as U,aU as D,p as j,m as s,q as f,s as r,j as t,g as v,v as a,i as l,x as B,y as o,ak as P,G as S,D as T,Q as b,$ as q,eB as G,n as R,P as E}from"./CelG4gE-.js";import{N as I}from"./D1Gzdxz2.js";import{N as M}from"./BqbJvCfn.js";import{a as W}from"./CA0Z1TYk.js";import"./CNEiMuKb.js";import"./BEsEYW11.js";import"./D2abE-jK.js";import"./DAQteJlc.js";import"./B6maBhbO.js";import"./Dp4i8kSM.js";const $={class:"content"},z={class:"header"},A={class:"form-group firstname-input"},H={class:"buttons"},L=F({__name:"index",setup(Q){const{isAuthenticated:g,fetchCustomerDetails:y,customerId:_,redirectToLogout:N}=U(),k=D(),{sourceUrl:w,redirectTo:C}=k.currentRoute.value.query;j(()=>g?.value,async i=>{i&&await y()?.load()},{immediate:!0});const d=s(null),n=s({value:"",error:""}),x=s(!1),u=s(!1),c=s(!1),h=async()=>{await R(`${C||w||"/"}`,{replace:!0})},p=async()=>{x.value=!0,d.value.isValid();const i={id:_.value,data:{firstName:n.value.value}},{success:e,error:m,data:V}=W.safeParse(i);m||e&&(u.value=!0,await G().customerUpdateFirstname(V).then(async()=>{await h()}).catch(()=>{c.value=!0}).finally(()=>{u.value=!1}))};return(i,e)=>(v(),f(t(q),{class:"page-wrapper"},{default:r(()=>[a("div",$,[a("div",z,[l(t(B),{h1:"",styled:"h3",strong:""},{default:r(()=>e[1]||(e[1]=[o("Wat is je voornaam?")])),_:1}),e[2]||(e[2]=a("p",{class:"subtitle"}," We hebben je voornaam nodig om je profiel compleet te maken en verder te gaan. ",-1))]),a("form",{class:"form",novalidate:"",onSubmit:P(p,["prevent"])},[t(c)?(v(),f(t(I),{key:0,class:"server-error",type:"prominent"},{default:r(()=>e[3]||(e[3]=[o("Er is iets misgegaan."),a("br",null,null,-1),o("Probeer opnieuw.")])),_:1})):S("",!0),a("div",A,[l(M,{ref_key:"firstNameField",ref:d,name:t(n),"onUpdate:name":e[0]||(e[0]=m=>T(n)?n.value=m:null),"field-name":"firstname",label:"Voornaam","data-testid":"registration-firstname-input",required:""},null,8,["name"])]),a("div",H,[l(t(b),{class:"button",primary:"",block:"",type:"submit","in-progress":t(u),onClick:p},{default:r(()=>e[4]||(e[4]=[o("Gegevens opslaan")])),_:1},8,["in-progress"]),l(t(b),{class:"button",secondary:"",block:"",type:"button",onClick:t(N)},{default:r(()=>e[5]||(e[5]=[o("Ga verder zonder account")])),_:1},8,["onClick"])])],32)])]),_:1}))}}),re=E(L,[["__scopeId","data-v-7b962f51"]]);export{re 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.