import{j as k,aX as b,m as V,e as v}from"./index-CRze-aDK.js";import{C as x,a8 as B,N as d,D as p,E as s,P as r,Q as T,O as c,S as i,R as l,am as m,F as w,J as P,K as n,u as o}from"./vendor-BGtMsOoo.js";import{_ as C}from"./product-card-grid.vue_vue_type_script_setup_true_lang-DTzN8zH8.js";const $={class:"mx-auto w-full max-w-screen-xl px-5 md:px-12"},A={class:"text-center lg:text-lg"},D=x({__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 B(async()=>{await g({itemsPerPage:a.count,keyword:a.query,filter:a.filter})}),(t,N)=>{const h=d("VcTypography"),y=d("VcButton");return s(),p("div",{class:m(["py-10 lg:py-24",t.background])},[r("div",$,[T(h,{tag:"h2",variant:"h1",class:"mb-2 text-center lg:mb-4"},{default:c(()=>[i(l(t.title),1)]),_:1}),r("div",A,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(C),{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)}}}),F=v(D,[["__scopeId","data-v-52e81a88"]]);export{F as default};
//# sourceMappingURL=products-block-D7clhcm4.js.map
