import{booleanType as e,functionType as t,stringType as n,withInstall as r}from"../_util/type.mjs";import i from"../_util/warning.mjs";import a from"../_util/classNames.mjs";import o from"../config-provider/hooks/useConfigInject.mjs";import s from"../_util/vue-types/index.mjs";import c from"../vc-slick/index.mjs";import l from"./style/index.mjs";import{computed as u,createVNode as d,defineComponent as f,ref as p,watchEffect as m}from"vue";var h=()=>({effect:n(),dots:e(!0),vertical:e(),autoplay:e(),easing:String,beforeChange:t(),afterChange:t(),prefixCls:String,accessibility:e(),nextArrow:s.any,prevArrow:s.any,pauseOnHover:e(),adaptiveHeight:e(),arrows:e(!1),autoplaySpeed:Number,centerMode:e(),centerPadding:String,cssEase:String,dotsClass:String,draggable:e(!1),fade:e(),focusOnSelect:e(),infinite:e(),initialSlide:Number,lazyLoad:n(),rtl:e(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:e(),swipeToSlide:e(),swipeEvent:t(),touchMove:e(),touchThreshold:Number,variableWidth:e(),useCSS:e(),slickGoTo:Number,responsive:Array,dotPosition:n(),verticalSwiping:e(!1)}),g=r(f({compatConfig:{MODE:3},name:`ACarousel`,inheritAttrs:!1,props:h(),setup(e,{slots:t,attrs:n,expose:r}){let s=p();r({goTo:(e,t=!1)=>{s.value?.slickGoTo(e,t)},autoplay:e=>{s.value?.innerSlider?.handleAutoPlay(e)},prev:()=>{s.value?.slickPrev()},next:()=>{s.value?.slickNext()},innerSlider:u(()=>s.value?.innerSlider)}),m(()=>{i(e.vertical===void 0,`Carousel`,"`vertical` is deprecated, please use `dotPosition` instead.")});let{prefixCls:f,direction:h}=o(`carousel`,e),[g,_]=l(f),v=u(()=>e.dotPosition?e.dotPosition:e.vertical===void 0?`bottom`:e.vertical?`right`:`bottom`),y=u(()=>v.value===`left`||v.value===`right`),b=u(()=>{let t=`slick-dots`;return a({[t]:!0,[`${t}-${v.value}`]:!0,[`${e.dotsClass}`]:!!e.dotsClass})});return()=>{let{dots:r,arrows:i,draggable:o,effect:l}=e,{class:u,style:p,...m}=n,v=l===`fade`||e.fade,x=a(f.value,{[`${f.value}-rtl`]:h.value===`rtl`,[`${f.value}-vertical`]:y.value,[`${u}`]:!!u},_.value);return g(d(`div`,{class:x,style:p},[d(c,{ref:s,...e,...m,dots:!!r,dotsClass:b.value,arrows:i,draggable:o,fade:v,vertical:y.value},t)]))}}}));export{h as carouselProps,g as default};