import a from"./Dyp1qGEf.js";import d from"./CE4It_C4.js";import{K as c,m as i,j as t,k as p,F as u,B as x,a7 as n,i as s}from"./BCLrUOBx.js";import"./CTAcmMAz.js";import"./B2sEaWda.js";import"./a5umXhxZ.js";import"./Bxmfm8sn.js";import"./BnLnKt_p.js";import"./Di7fl9dA.js";import"./Ce8lFovl.js";const _={name:"SuggestedAjaxSlider",data(){return{sliderContainerWidth:0}},watch:{},props:{itemList:{type:Array,default(){return[]}},currentPagination:{type:Number},totalPage:{type:Number},currentPage:{type:Number},draggedWidth:{type:Number}},components:{ProductTile:a,TileShimmer:d},computed:{parentWidthStyle(){return{"flex-basis":`${this.totalPage*this.sliderContainerWidth}px`,width:`${this.totalPage*this.sliderContainerWidth}px`,"max-width":`${this.totalPage*this.sliderContainerWidth}px`,"min-width":`${this.totalPage*this.sliderContainerWidth}px`}},translateXInPx(){return`translate3d(${((this.currentPage-1)*this.sliderContainerWidth+this.draggedWidth)*-1}px, 0, 0)`},itemWidthStyle(){return{"flex-basis":`${this.itemWidthInPx}px`,width:`${this.itemWidthInPx}px`,"max-width":`${this.itemWidthInPx}px`,"min-width":`${this.itemWidthInPx}px`}},itemWidthInPx(){return this.sliderContainerWidth/this.currentPagination}},mixins:[],methods:{},created(){},mounted(){this.$nextTick(()=>{this.sliderContainerWidth=this.$refs["main-slider"].clientWidth})}},W={ref:"main-slider",class:"flow-hidden"};function P(f,g,o,y,$,e){const m=a,h=d;return t(),i("div",W,[p("ul",{class:"c_slider__container shimmer-wrapper",style:n([e.parentWidthStyle,{transform:e.translateXInPx}])},[(t(!0),i(u,null,x(o.itemList,(r,l)=>(t(),i("li",{key:l,style:n([{"max-width":"100px"},e.itemWidthStyle])},[r?(t(),s(m,{key:0,product:r,class:"mb-20 mb-sm-15"},null,8,["product"])):(t(),s(h,{key:1}))],4))),128))],4)],512)}const j=c(_,[["render",P]]);export{j as default};
