import{v as B,a as u,c as d,b as f,e as m,w as i,f as a,n as h,az as g,H as S,z as _,i as w,h as p,al as A,K as z,R as M,q as Q}from"./index-OSKNspXo.js";/* empty css                                                                                  */const j={__name:"deenovaCarousselComponent",props:{eltHeight:{type:String},center:{type:Boolean}},setup(c){var v;const l=u(null),r=u(null),y=u(((v=r.value)==null?void 0:v.clientWidth)??300);function C(o,e,t){return typeof t>"u"||+t==0?Math[o](e):(e=+e,t=+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math[o](+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}const s=d(()=>{var e;const o=(e=l.value)==null?void 0:e.getScroll();return!!o&&!!r.value&&o.horizontalSize>r.value.clientWidth}),k=d(()=>{var e;const o=(e=l.value)==null?void 0:e.getScrollPosition();return!!o&&s.value&&o.left>0}),N=d(()=>{var t,n;const o=(t=l.value)==null?void 0:t.getScrollPosition(),e=C("ceil",(n=l.value)==null?void 0:n.getScroll().horizontalPercentage,-2);return!!o&&s.value&&e<1});function P(){var e,t;const o=(e=l.value)==null?void 0:e.getScrollPosition();if(o){let n=o.left-y.value;(t=l.value)==null||t.setScrollPosition("horizontal",n>=0?n:0,300)}}function b(){var e,t;const o=(e=l.value)==null?void 0:e.getScrollPosition();if(o){let n=o.left+y.value;(t=l.value)==null||t.setScrollPosition("horizontal",n>=0?n:0,300)}}return(o,e)=>(m(),f(Q,{class:"w-100",dense:"",style:{padding:"0"}},{default:i(()=>[a(h,{avatar:"",style:g([{padding:"0"},{width:s.value?"1.25rem":"0"}])},{default:i(()=>[s.value?(m(),f(_,{key:0,round:"",disable:!k.value,style:{position:"relative",left:"0","z-index":"100"},onClick:w(P,["stop"]),icon:"chevron_left",color:"primary"},null,8,["disable"])):S("",!0)]),_:1},8,["style"]),a(h,null,{default:i(()=>[p("div",{class:"elt-line row items-center",ref_key:"carousel",ref:r,style:g({height:c.eltHeight??"3rem"})},[a(A,{class:"fit",ref_key:"scrollAreaRef",ref:l},{default:i(()=>[p("div",{class:z(["elt-line row items-center",[c.center?"justify-center":null]]),style:{"flex-wrap":"unset"}},[p("div",{class:z(["elt-line row items-center",[c.center?"justify-center":null]]),style:{"flex-wrap":"unset"}},[M(o.$slots,"body",{},void 0,!0)],2)],2)]),_:3},512)],4)]),_:3}),a(h,{side:"",style:{width:"1.25rem"}},{default:i(()=>[s.value?(m(),f(_,{key:0,round:"",disable:!N.value,style:{position:"relative",left:"-2.25rem","z-index":"100"},onClick:w(b,["stop"]),icon:"chevron_right",color:"primary"},null,8,["disable"])):S("",!0)]),_:1})]),_:3}))}},R=B(j,[["__scopeId","data-v-44ac8464"]]);export{R as D};
//# sourceMappingURL=deenovaCarousselComponent-BsPtnAby.js.map
