1import{_ as N}from"./CK3j4WxR.js";import{d as P,p as h,u as M,s as V,J as T,B,D as C,h as F,i as L,j as n,w as c,k as a,H as X,v as q,I as E,_ as K,c as R,K as x,n as l}from"./CfwR7KjC.js";import{u as W,a as j}from"./Dsl0BBls.js";const H={class:"bg-white p-4"},$={class:"grid grid-cols-6"},A={class:"col-span-6 lg:col-span-3"},Q=P({__name:"inloggen",setup(J){const I=h("isPro").value?"MIXpro":"MIXonline";M({title:"Inloggen - "+I});const u=V({}),S=T(),{login:y}=B(),k=async p=>{var r,i,t,f,g,_;const{identifier:e,password:s}=p;try{const o=await y({identifier:e,password:s});W().$show({message:"Succesvol ingelogd."}),S.value=!0;const v=R().query.referer;if(v){await x().push(v);return}else{const w=(t=(i=(r=o==null?void 0:o.user.value)==null?void 0:r.profile)==null?void 0:i.profileTags)==null?void 0:t.find(m=>m.name==="MIX abonnee"),b=(_=(g=(f=o==null?void 0:o.user.value)==null?void 0:f.profile)==null?void 0:g.profileTags)==null?void 0:_.find(m=>m.name==="MIXpro abonnee"),d=h("isPro").value;d&&!b&&w?l("/"):!d&&!w&&b?l("/pro"):d?l("/pro"):l("/")}}catch{j().$show({title:"Er is iets misgegaan.",message:"Het inloggen mislukt. Probeer het later opnieuw.",buttons:[{text:"Sluiten"},{text:"Wachtwoord vergeten",onClick:()=>{x().push("/wachtwoord-vergeten")}}]})}};return(p,e)=>{const s=C("FormKit"),r=N,i=K;return L(),F("div",null,[n(i,{name:"default",sidebar:!1},{default:c(()=>[a("div",H,[a("div",$,[a("div",A,[e[2]||(e[2]=a("h1",null,"Inloggen",-1)),e[3]||(e[3]=a("p",null,"Log in met je e-mailadres en wachtwoord.",-1)),n(s,{id:"loginForm",modelValue:q(u),"onUpdate:modelValue":e[0]||(e[0]=t=>X(u)?u.value=t:null),type:"form",actions:!1,onSubmit:k},{default:c(({disabled:t})=>[n(s,{label:"E-mailadres",name:"identifier",type:"email",validation:"required|email"}),n(s,{label:"Wachtwoord",name:"password",type:"password",validation:"required"}),n(r,{to:"/wachtwoord-vergeten",class:"block mb-2"},{default:c(()=>e[1]||(e[1]=[E(" Wachtwoord vergeten? ")])),_:1,__:[1]}),n(s,{type:"submit",label:"Inloggen",disabled:t},null,8,["disabled"])]),_:1},8,["modelValue"])])])])]),_:1})])}}});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.