import{_ as l,at as m,o as f}from"./index-bc1cd1f7.js";import{b as g,p as C,c as P,d as S}from"./Main-5e1e6212.js";import{P as h}from"./ProductCard-a724df0f.js";import{b5 as _,bm as d,e as i,bn as c,bf as r,g as b,bh as k,N as u,l as w}from"./vendor-d15da3cb.js";import"./tendor-09c4e69c.js";const v={components:{TCSlider:m,ProductCard:h},computed:{...f(C,g),sliderPerView(){const{xs:t,sm:e,md:o}=_();return t.value?2:e.value||o.value?6:8}},methods:{onReachEnd(t){this.getList({pageIndex:t,pageSize:20})},getList(t){this.productsStore.giftCartProductsModule.next&&this.productsStore.giftCartProductsModule.getGiftProducts(t)}},watch:{"basketStore.basket"(){this.basketStore.getProductsTypeCount?this.getList({pageIndex:1,pageSize:20}):this.productsStore.giftCartProductsModule.resetGiftCartProducts()}},mounted(){this.getList({pageIndex:1,pageSize:20})},unmounted(){this.productsStore.giftCartProductsModule.resetGiftCartProducts()}},V={class:"section-title"};function x(t,e,o,M,G,a){const n=d("ProductCard"),p=d("TCSlider");return i(),c(S,{class:"mb-6"},{default:r(()=>[t.productsStore.giftCartProductsModule.products.length>0?(i(),c(P,{key:0,cols:"12"},{default:r(()=>[b("div",V,k(t.$t("GIFT_CARDS")),1),u(p,{"space-between":16,"per-view":a.sliderPerView,items:t.productsStore.giftCartProductsModule.products,onReachEnd:e[0]||(e[0]=s=>a.onReachEnd(s))},{default:r(({item:s})=>[u(n,{item:s},null,8,["item"])]),_:1},8,["per-view","items"])]),_:1})):w("",!0)]),_:1})}const N=l(v,[["render",x]]);export{N as default};