1import{a as h,_ as v,l as a,b as M}from"./site-B5BZOBvc.js";import{d as w,n as g,i,u as e,Q as s,U as k,F as G,q as $,g as C,V as R,z as P,R as c,H as u,r as _,o as F,w as S,x as b,T as j}from"./tailwind-zaRMLzvT.js";import"./vue-sonner-DDsQ13aw.js";import"./vue.esm-bundler-BQEhA1XK.js";import"./compiler-dom.esm-bundler-CuYavsf8.js";import"./PopoverTrigger-BaEuxe5d.js";import"./PopperArrow-Bu4UFnR3.js";import"./money-CAlUuNCF.js";import"./TabsTrigger-CGV7yd66.js";import"./check-BSANhuA6.js";import"./index.esm-C5Q4iU_x.js";import"./pencil-lWNaaoFU.js";import"./circle-check-yge9GZGF.js";import"./DialogTitle-u17PkhKS.js";import"./DialogDescription-CxqFoTgs.js";import"./DialogTrigger-qerA61Q7.js";import"./x-CE-ELC_A.js";import"./mitt-DJ65BbbF.js";const A={key:0},B={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8"},O={class:"mt-10 flex justify-center"},L=["disabled"],V={key:1,class:"w-full bg-gray-100 p-8 text-center rounded-xl"},z=6,D=w({__name:"ProductList",props:{showFilters:{type:Boolean}},setup(m){const o=h(),t=async()=>{o.toggleAll=!0,o.getProducts()};return(p,f)=>{var d;return i(),g("div",null,[((d=e(o).products)==null?void 0:d.length)>0?(i(),g("div",A,[s("div",B,[(i(!0),g(G,null,$(e(o).products,n=>(i(),C(v,{product:n,layout:"list"},null,8,["product"]))),256))]),k(s("div",O,[s("button",{class:c(["rounded-md border px-8 py-3 font-semibold transition",e(o).toggleAll?"cursor-default border-gray-300 text-gray-400":"border-primary text-primary hover:bg-primary hover:text-white bg-white"]),disabled:e(o).toggleAll,onClick:P(t,["prevent"])},u(e(o).toggleAll?e(a)("site.courses.all_shown"):e(a)("site.courses.show_all")),11,L)],512),[[R,e(o).productCount>z]])])):(i(),g("div",V,u(e(a)("site.product.no_products_found")),1))])}}}),N={class:"w-full"},T={class:"flex flex-wrap justify-center md:justify-start items-center gap-1 lg:mb-12 mb-6"},q={class:"flex bg-white border border-gray-200 rounded-full w-fit"},E={class:"flex items-center overflow-hidden gap-1 lg:gap-3"},H={key:0,"aria-labelledby":"product-heading",class:"my-6 lg:col-span-2 lg:mt-0 xl:col-span-3"},Q={key:1,class:"w-full lg:w-3/4 flex align-center justify-center"},ue=w({__name:"ProductOverview",props:{initialFilters:{},category:{},priceRange:{},search:{},collectionPage:{}},setup(m){const o=m,t=h();M();const p=_(!0),f=_(!0);F(()=>{var n,r,l;Object.hasOwn(o.initialFilters,"recurring")&&(t.toggleRecurringModules=!0),(Object.hasOwn(o.initialFilters,"course_type")||(r=(n=o.category)==null?void 0:n.name)!=null&&r.includes("Groep"))&&(t.toggleGroupModules=!0),t.setCategorySlug((l=o.category)==null?void 0:l.slug),d()});const d=()=>{p.value=!0,t.getProducts().then(()=>{p.value=!1}).catch(console.error)};return S(()=>[t.toggleGroupModules,t.toggleRecurringModules],(n,r)=>{var l,y,x;r!==n&&d(),(y=(l=o.category)==null?void 0:l.name)!=null&&y.includes("Groep")&&!t.toggleGroupModules&&o.collectionPage&&(window.location.href=(x=o.collectionPage)==null?void 0:x.full_slug)}),(n,r)=>(i(),g("div",N,[s("div",T,[s("div",q,[s("button",{class:c(["px-4 py-4 lg:py-5 leading-0 rounded-full text-xs lg:text-sm font-semibold transition",{"bg-primary text-white":!e(t).toggleGroupModules,"text-gray-600":e(t).toggleGroupModules}]),onClick:r[0]||(r[0]=l=>{e(t).toggleGroupModules=!1})},u(e(a)("site.product.for_yourself")),3),s("button",{class:c(["px-4 py-4 lg:py-5 leading-0 rounded-full text-xs lg:text-sm font-semibold transition text-gray-600",{"bg-primary text-white":e(t).toggleGroupModules,"text-gray-600":!e(t).toggleGroupModules}]),onClick:r[1]||(r[1]=l=>{e(t).toggleGroupModules=!0})},u(e(a)("site.product.group_courses")),3)]),s("div",E,[s("button",{class:c(["px-3 py-2 lg:px-6 lg:py-3 text-xs lg:text-sm font-semibold transition rounded-md",{"bg-primary text-white":!e(t).toggleRecurringModules,"bg-gray-50 hover:bg-gray-100":e(t).toggleRecurringModules}]),onClick:r[2]||(r[2]=l=>{e(t).toggleRecurringModules=!1})},u(e(a)("site.product.overview.filter.basic")),3),s("button",{class:c(["px-3 py-2 lg:px-6 lg:py-3 text-xs lg:text-sm font-semibold transition rounded-md",{"bg-primary text-white":e(t).toggleRecurringModules,"bg-gray-50 hover:bg-gray-100":!e(t).toggleRecurringModules}]),onClick:r[3]||(r[3]=l=>{e(t).toggleRecurringModules=!0})},u(e(a)("site.product.overview.filter.group")),3)])]),p.value?(i(),g("div",Q,[b(e(j),{class:"h-20 w-20 animate-spin","stroke-width":"1",stroke:"gray"})])):(i(),g("section",H,[b(D,{"show-filters":f.value},null,8,["show-filters"])]))]))}});
1export{ue as default}; 2//# sourceMappingURL=ProductOverview-BPqOBUFU.js.map
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.