1import{_ as D}from"./Dm_k7zCm.js";import j from"./C_ge871h.js";import{_ as I}from"./DruFmVpr.js";import{_ as N}from"./xWmVlUUY.js";import{_ as P}from"./BKAq3ZSH.js";import{a as q,_ as V}from"./DcoDQ2OP.js";import{k as M,ab as T,aq as z,o as r,d as _,e as t,F as A,C as H,Z as a,ar as b,x as R,v as g,t as B,af as m,n as v,ac as d,s as p,al as S,aE as F,_ as L}from"./fS3RJ1g0.js";import{E as G,t as O}from"./C7MZYr3Z.js";import{u as U}from"./CSEkG82e.js";import{_ as Q}from"./s0HtGtt2.js";import{_ as Y}from"./6iAwh0lC.js";import"./DbZV-80b.js";import"./lE4E6gt-.js";import"./B6MCvFEd.js";import"./BKy_4jyv.js";import"./C6mbwpNx.js";import"./BoGSnDYl.js";import"./DxcAWBrU.js";import"./4qiROYsv.js";import"./B_p7OMvR.js";const Z={class:"col-span-12 -my-5 -mr-7 bg-primary-deep-50 px-8 pt-16 pb-24 text-primary max-lg:-ml-7 lg:col-span-5 xl:col-span-4"},J={id:"sidetable",class:"sticky top-28 text-primary-deep"},K={id:"table-cards",class:"grid grid-cols-1 divide-y divide-primary-deep-300"},W={class:"text-primary"},X={class:"h1"},ee={class:"relative w-full rounded-md bg-primary-deep text-white"},te={class:"p-4 pr-14"},se={class:"flex flex-col space-y-2"},ne={key:0,class:"bg-opacity-40 inline-block w-fit rounded-md bg-secondary px-3 py-2 text-center text-xs leading-tight font-bold tracking-wider text-white uppercase"},oe={key:1,class:"bg-opacity-40 inline-block w-fit rounded-md bg-secondary px-3 py-2 text-xs leading-tight font-bold tracking-wider text-white uppercase"},ae={class:"leading-5 font-semibold"},ie={key:2,class:"leading-6 font-light"},re={key:3,class:"flex flex-wrap gap-x-4 gap-y-1"},le={key:0,class:"absolute right-0 bottom-0"},ce={type:"button",class:"btn btn-primary size-11 items-center justify-center p-0"},de=M({__name:"TrainingDates",props:{events:{}},setup($){const u=$,c=T(),o=z(),k=v(()=>new Set(u.events.map(e=>o.format(e.start_date,null,"yyyy"))).size>1);function y(i){const e={member:0,nonMember:0,nullCategory:0};
1return i.products?.length?i.products.reduce((n,l)=>(l?.price_category==="ledenprijs"?n.member+=l.price??0:l?.price_category==="niet_ledenprijs"?n.nonMember+=l.price??0:l?.price_category===null&&(n.nullCategory+=l.price??0),n),e):null}const{format:f}=U(),w=v(()=>{if(!u.events?.length)return[];const i=Array.isArray(c.query.regions)?c.query.regions:c.query.regions?[c.query.regions]:[];return u.events.map(e=>{const n=y(e),l=e.start_date;return{uuid:e.uuid,location:e.location_name||"Nader te bepalen",region:e.region,address:e.address??{},signup_closed:e.signup_closed,availability_status:e.availability_status,date:o.format(e.start_date,null,`d MMM ${k.value?" yyyy":""}`),rawDate:l,times:{start:o.formatTime(e.start_date),end:o.formatTime(e.end_date)},price:n?{member:n.member?`${f(n.member)} p. persoon`:"Gratis",nonMember:n.nonMember?`${f(n.nonMember)} p. persoon`:"Gratis"}:null}}).filter(e=>i.length===0||i.includes(e.region)).sort((e,n)=>e.rawDate.localeCompare(n.rawDate))});function h(i){return i.signup_closed?null:i.external_url?i.external_url:{name:"trainingen-slug-uuid-aanmelden",params:{slug:c.params.slug,uuid:i.uuid}}}return(i,e)=>{const n=q,l=j,x=R;return r(),_("div",Z,[t("div",J,[e[1]||(e[1]=t("div",{class:"mb-4"},[t("h2",null," Beschikbare data "),t("p",null," Schrijf je direct in voor de onderstaande data. ")],-1)),t("section",K,[(r(!0),_(A,null,H(a(w),s=>(r(),_("div",{key:s.uuid,class:"flex flex-col gap-3 [&:not(first-child)]:pt-3"},[t("div",W,[t("div",X,d(s.date),1),t("div",null,d(s.times.start)+" - "+d(s.times.end),1)]),p(x,{class:"grid w-full cursor-pointer grid-cols-1 gap-y-5 text-start no-underline",to:h(s)},{default:g(()=>[t("div",ee,[t("div",te,[t("div",se,[s.signup_closed?(r(),_("div",ne," Inschrijving gesloten ")):s.availability_status===a(G).FullyBooked?(r(),_("div",oe," Volgeboekt ")):m("",!0),t("p",ae,d(s.location),1),s.address.title?(r(),_("p",ie,d(s.address.title)+" "+d(s.address.house_number_with_suffix)+", "+d(s.address.zipcode)+" "+d(s.address.city),1)):m("",!0),s.price?(r(
1),_("div",re,[p(n,{label:`${s.price.member} voor leden`,type:"success"},null,8,["label"]),p(n,{label:`${s.price.nonMember} voor niet leden`,type:"success"},null,8,["label"])])):m("",!0)])]),s.signup_closed?m("",!0):(r(),_("div",le,[t("button",ce,[p(l,{class:"w-4"})])]))])]),_:2},1032,["to"])]))),128)),Object.keys(a(c).query).length&&u.events?.length!==a(w)?.length?(r(),b(x,{key:0,class:"py-4",to:{name:a(c).name,params:{slug:a(c).params.slug}}},{default:g(()=>[...e[0]||(e[0]=[B(" Toon alle data ",-1)])]),_:1},8,["to"])):m("",!0)])])])}}}),_e=Object.assign(de,{__name:"EventsTrainingDates"}),pe={class:"fixed bottom-0 z-40 block w-full gap-2 bg-grey-100 p-5 md:hidden"},ue={href:"#sidetable",class:"btn btn-primary w-full transition-all"},me={class:"grid h-full"},ge={class:"col-span-12 gap-x-4 lg:col-span-7 lg:gap-x-6 xl:col-span-8 xl:gap-x-7"},ye={class:"overflow-clip rounded-xl bg-white"},fe={class:"max-w-full"},he={key:1,src:V,alt:"",class:"object-cover"},xe={class:"p-4 pt-7 md:p-8 lg:p-10"},be={class:"mb-5 space-y-1"},ve={class:"text-lg"},ke={class:"text-secondary"},we={class:"prose max-w-none"},$e=M({__name:"index",setup($){const u=T(),{result:c}=O({slug:u.params.slug}),o=v(()=>c.value?.training??{}),k=v(()=>o.value.active_image?o.value.active_image.url:"/fallback/event.jpg");S({title:o.value?.title});const y=F();function f(){window.history.length>1?y.back():y.push({name:"trainingen"})}return(w,h)=>{const i=D,e=j,n=I,l=N,x=P,s=_e,C=Q,E=Y;return r(),b(E,null,{header:g(()=>[p(i,{headers:[{name:"Trainingen",link:"/trainingen"},{name:`${a(o)?.title}`}]},null,8,["headers"])]),default:g(()=>[t("div",pe,[t("a",ue,[h[0]||(h[0]=B(" Inschrijven ",-1)),p(e,{class:"size-3 rotate-90"})])]),p(C,null,{default:g(()=>[t("div",me,[t("div",ge,[p(n,{class:"flex-none",onClick:f}),t("div",ye,[t("div",fe,[a(o).active_image?.url?(r(),b(l,{key:0,src:a(k),alt:a(o).title,class:"object-cover"},null,8,["src","alt"])):(r(),_("img",he))]),t("div",xe,[t("div",be,[t("h1",ve,d(a(o).title),1),t("div",ke,d(a(o).region),1)]),t("div",we,[a(o).description?(r(),b(x,{key:0,value:a(o).description},null,8,["value"])):m("",!0)])])])]),p(s,{events:a(o).events??[]},null,8,["events"])])]),_:1})]),_:1})}}}),Oe=L($e,[["__scopeId","data-v-025d9749"]]);export{Oe 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.