1import g from"./Cni3DUxv.js";import{d as h,dh as c,r as k,c as s,e as w,f as l,g as n,i as a,B as b,J as P,K as x,j as v,x as f,q as S,k as E}from"./BmND6XgJ.js";import"./SxI74O3b.js";import"./DLOzXzRy.js";import"./DcgAVr9z.js";import"./CXUjOu3f.js";import"./BiTlvJtH.js";const I=h({name:"ProductGroupsDesktopCarousel",components:{ProductGroupsItem:g},props:{items:{type:Array,required:!0},textColor:{type:String,default:"text-EXPONDO-black"},backgroundColor:{type:String,default:"bg-EXPONDO-grey-5"}},setup(e){const r="flex items-center justify-center absolute top-1/2 -translate-y-1/2 w-9 h-9 bg-EXPONDO-white border border-EXPONDO-grey-20",t=k(0),d=c.MAX_VISIBLE_ITEMS,u=s(()=>Math.ceil(e.items.length/d)),i=s(()=>e.items.length>d),m=s(()=>e.items.length>=c.MIN_ITEMS&&e.items.length<=c.MAX_VISIBLE_ITEMS?"flex-1":"flex-none"),o=s(()=>({transform:`translateX(-${t.value*100}%)`})),p=s(()=>i.value&&t.value<u.value-1),y=()=>{t.value<u.value-1&&(t.value+=1)},C=s(()=>i.value&&t.value>0);return{currentSlide:t,hasMoreThanMaxPerSlide:i,itemClass:m,carouselStyle:o,maxSlides:u,nextSlide:y,prevSlide:()=>{t.value>0&&(t.value-=1)},arrowClasses:r,shouldShowNextArrow:p,shouldShowPrevArrow:C}}}),N={class:"hidden lg:block relative w-full h-full px-9"},O={class:"overflow-hidden w-full"};function M(e,r,t,d,u,i){const m=g;return l(),n("div",N,[a("div",O,[a("div",{class:"flex gap-4 transition-transform duration-500 ease-in-out",style:b(e.carouselStyle)},[(l(!0),n(P,null,x(e.items,(o,p)=>(l(),n("div",{key:p,class:f(["product-groups-slider__item flex",e.itemClass])},[E(m,{item:o,"text-color":e.textColor,"background-color":e.backgroundColor},null,8,["item","text-color","background-color"])],2))),128))],4)]),r[5]||(r[5]=v()),a("div",null,[e.shouldShowPrevArrow?(l(),n("button",{key:0,class:f([e.arrowClasses,"rounded-l-lg"]),onClick:r[0]||(r[0]=(...o)=>e.prevSlide&&e.prevSlide(...o))},[...r[2]||(r[2]=[a("span",{class:"iconify svg--chevron-left"},null,-1)])],2)):S("",!0),r[4]||(r[4]=v()),e.shouldShowNextArrow?(l(),n("button",{key:1,class:f([e.arrowClasses,"right-9 rounded-r-lg"]),onClick:r[1]||(r[1]=(...o)=>e.nextSlide&&e.nextSlide(...o))},[...r[3]||(r[3]=[a("span",{class:"iconify svg--chevron-right"},null,-1)])],2)):S("",!0)])])}const G=Object.assign(w(I,[["render",M]]),{__name:"ProductGroupsDesktopCarousel"});export{G as default}; 2//# sourceMappingURL=BcrR39iF.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.