1import{_ as E}from"./DTROmkUV.js";import{d as j,m as h,o as N,aY as _,R as m,M as z,s,k as r,t as e,J as k,E as c,x as M,y as S,N as B,F as p,A as v,v as C,am as L,Y as $}from"./BXJ-i0A5.js";import{u as D}from"./CVnwCylC.js";import{s as F}from"./CqkHd6Nn.js";import{u as R}from"./BxAzPr95.js";import"./DK-RAXnP.js";import"./rMuCKOrl.js";import"./Bqmk3lb0.js";import"./DiTyQX9r.js";import"./B1KvDhdn.js";import"./D4KLOwjz.js";import"./Cqli9ZD5.js";import"./jyTQt8dV.js";import"./CGE79Tdg.js";import"./DIbOZblZ.js";import"./Ct_uy4jW.js";const Y={class:"bestseller px-4 md:px-0 py-12 md:py-16"},A={class:"container mx-auto"},J={key:0,class:"title"},U={class:"text-2xl md:text-3xl lg:text-4xl font-bold"},W={class:"space-x-0 md:space-x-4 hidden md:flex items-center justify-center absolute md:relative bottom-[30px] md:bottom-0 w-full md:w-auto flex-col md:flex-row"},q={key:0,class:"nav-wrap space-x-2 md:space-x-4 flex items-center justify-center"},G={class:"mx-auto relative container"},H={key:0,class:"overflow-hidden flex gap-4 md:hidden -mx-[20px] px-[20px]"},K={key:1,class:"overflow-hidden hidden md:flex gap-4"},O={key:2,class:"overflow-x-auto hide-scrollbar -mx-[20px]"},Q={class:"flex px-[20px]"},T={class:"slider seller-uti-slider w-[calc(100% + 2px)] -mx-[1px]"},X=j({__name:"CmsElementProductSlider",props:{content:{}},setup(V){const u=V,{getConfigValue:P}=R(u.content),i=h(!1),f=()=>{i.value=window.innerWidth<768};N(()=>{f(),window.addEventListener("resize",f)}),_(()=>{window.removeEventListener("resize",f)});const x=m(()=>{var o,t;return((t=(o=u.content)==null?void 0:o.data)==null?void 0:t.products)??[]}),b=m(()=>P("title")),g=h(null),n=D(g,{effect:"slide",loop:!0,grabCursor:!0,autoplay:{delay:5e3},slidesPerView:2,initialSlide:0,breakpoints:{576:{slidesPerView:1},768:{slidesPerView:2},1024:{slidesPerView:3},1200:{slidesPerView:4}}}),w=h(!1),y=m(()=>{var o;return!i.value&&(((o=n.instance.value)==null?void 0:o.initialized)||!1)});let a=null;z(y,()=>{y.value&&(w.value=!0,a&&clearInterval(a),a=F(()=>{i.value||n.next()},5e3))}),_(()=>{a&&clearInterval(a)});const I=m(()=>{var t,d;const o=n.instance.value;return((t=o==null?void 0:o.params)==null?void 0:t.slidesPerView)<((d=x.value)==null?void 0:d.length)});return(o,t)=>{const d=E;return r(),s("div",Y,[e("div",A,[e("div",{class:k(["wrap flex items-center justify-between mb-8 md:mb-14","container-"+u.content.blockId])},[b.value?(r(),s("div",J,[e("h3",U,M(b.value),1)])):c("",!0),e("div",W,[I.value?(r(),s("div",q,[e("button",{onClick:t[0]||(t[0]=l=>S(n).prev()),class:"fas fa-chevron-left seller-left-control bg-medium-grey text-white text-xs md:text-base w-6 h-6 md:w-11 md:h-11 flex items-center justify-center rounded-full focus:outline-none hover:text-white hover:bg-dark-bg transition duration-300"}),e("button",{onClick:t[1]||(t[1]=l=>S(n).next()),class:"fas fa-chevron-right seller-right-control bg-medium-grey text-white text-xs md:text-base w-6 h-6 md:w-11 md:h-11 flex items-center justify-center rounded-full focus:outline-none hover:text-white hover:bg-dark-bg transition duration-300"})])):c("",!0)])],2)]),e("div",G,[i.value?c("",!0):(r(),s("div",H,[(r(),s(p,null,v(10,l=>e("div",{key:l,class:"animate-pulse min-w-[75%] md:min-w-[50%] lg:min-w-[32%] xl:min-w-[270px]"},t[2]||(t[2]=[e("div",{class:"bg-gray-200 h-64 rounded-lg mb-4"},null,-1),e("div",{class:"bg-gray-200 h-4 rounded w-3/4 mb-2"},null,-1),e("div",{class:"bg-gray-200 h-4 rounded w-1/2"},null,-1)]))),64))])),w.value?c("",!0):(r(),s("div",K,[(r(),s(p,null,v(10,l=>e("div",{key:l,class:"animate-pulse min-w-[75%] md:min-w-[50%] lg:min-w-[32%] xl:min-w-[24%]"},t[3]||(t[3]=[e("div",{class:"bg-gray-200 h-64 rounded-lg mb-4"},null,-1),e("div",{class:"bg-gray-200 h-4 rounded w-3/4 mb-2"},null,-1),e("div",{class:"bg-gray-200 h-4 rounded w-1/2"},null,-1)]))),64))])),i.value?(r(),s("div",O,[e("div",Q,[(r(!0),s(p,null,v(x.value,l=>(r(),s("div",{key:l.id,class:"border-r border-custom-grey pr-4 mr-4 min-w-[75%] w-[75%]"},[C(d,{product:l,class:"border-0"},null,8,["product"])]))),128))])])):c("",!0),B(e("div",{class:k(["inner-wrap overflow-hidden","space-left-"+u.content.blockId])},[e("div",T,[e("swiper-container",{ref_key:"productSlider",ref:g},[(r(!0),s(p,null,v(x.value,l=>(r(),s("swiper-slide",{key:l.id},[C(d,{product:l,class:"px-5 border-0 sm:border-r border-custom-grey"},null,8,["product"])]))),128))],512)])],2),[[L,w.value&&!i.value]])])])}}}),fe=$(X,[["__scopeId","data-v-f1c34a9e"]]);export{fe as default}; 2//# sourceMappingURL=IFq4A11j.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.