import{j as k,ao as b,m as V,e as T}from"./index-Dqv5IkpS.js";import{K as v,ac as x,S as d,L as p,M as s,U as r,V as B,T as c,X as i,W as l,aq as m,N as w,O as P,P as n,b as o}from"./vendor-bSWkQivH.js";import{_ as $}from"./product-card-grid.vue_vue_type_script_setup_true_lang-Dk_VZdOr.js";const A={class:"mx-auto w-full max-w-screen-xl px-5 md:px-12"},C={class:"text-center lg:text-lg"},N=v({__name:"products-block",props:{id:{},background:{},title:{},subtitle:{},count:{default:4},query:{},filter:{},cardType:{default:"full"},columnsAmountDesktop:{default:"4"},columnsAmountTablet:{default:"3"}},setup(f){const a=f,{products:u,fetchProducts:g}=k(),_=b(u);return x(async()=>{await g({itemsPerPage:a.count,keyword:a.query,filter:a.filter})}),(t,q)=>{const h=d("VcTypography"),y=d("VcButton");return s(),p("div",{class:m(["py-10 lg:py-24",t.background])},[r("div",A,[B(h,{tag:"h2",variant:"h1",class:"mb-2 text-center lg:mb-4"},{default:c(()=>[i(l(t.title),1)]),_:1}),r("div",C,l(t.subtitle),1),r("div",{class:m(["grid grid-cols-1 gap-6 xs:grid-cols-2 lg:gap-5",`md:grid-cols-${t.columnsAmountTablet}`,`lg:grid-cols-${t.columnsAmountDesktop}`])},[(s(!0),p(w,null,P(o(u),e=>(s(),n(o($),{key:e.id,"hide-properties":t.cardType==="short",product:e},{"cart-handler":c(()=>[e.hasVariations?(s(),n(y,{key:0,to:o(_)[e.id],class:"mb-4"},{default:c(()=>[i(l(t.$t("pages.demo_landing.products_block.choose_button")),1)]),_:2},1032,["to"])):(s(),n(o(V),{key:1,product:e},null,8,["product"]))]),_:2},1032,["hide-properties","product"]))),128))],2)])],2)}}}),R=T(N,[["__scopeId","data-v-52e81a88"]]);export{R as default};
//# sourceMappingURL=products-block-hpD4y1Wn.js.map
