"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("../_util/classNames.js"),e=require("../_util/type.js"),d=require("../_util/vue-types/index.js"),q=require("../_util/warning.js"),x=require("../config-provider/hooks/useConfigInject.js"),$=require("../vc-slick/slider.js"),A=require("./style/index.js"),f=()=>({effect:e.stringType(),dots:e.booleanType(!0),vertical:e.booleanType(),autoplay:e.booleanType(),easing:String,beforeChange:e.functionType(),afterChange:e.functionType(),prefixCls:String,accessibility:e.booleanType(),nextArrow:d.default.any,prevArrow:d.default.any,pauseOnHover:e.booleanType(),adaptiveHeight:e.booleanType(),arrows:e.booleanType(!1),autoplaySpeed:Number,centerMode:e.booleanType(),centerPadding:String,cssEase:String,dotsClass:String,draggable:e.booleanType(!1),fade:e.booleanType(),focusOnSelect:e.booleanType(),infinite:e.booleanType(),initialSlide:Number,lazyLoad:e.stringType(),rtl:e.booleanType(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:e.booleanType(),swipeToSlide:e.booleanType(),swipeEvent:e.functionType(),touchMove:e.booleanType(),touchThreshold:Number,variableWidth:e.booleanType(),useCSS:e.booleanType(),slickGoTo:Number,responsive:Array,dotPosition:e.stringType(),verticalSwiping:e.booleanType(!1)}),k=o.defineComponent({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:f(),setup(t,{slots:y,attrs:v,expose:b}){const l=o.ref();b({goTo:(a,s=!1)=>{l.value?.slickGoTo(a,s)},autoplay:a=>{l.value?.innerSlider?.handleAutoPlay(a)},prev:()=>{l.value?.slickPrev()},next:()=>{l.value?.slickNext()},innerSlider:o.computed(()=>l.value?.innerSlider)}),o.watchEffect(()=>{q.default(t.vertical===void 0)});const{prefixCls:n,direction:p}=x.default("carousel",t),[T,g]=A.default(n),r=o.computed(()=>t.dotPosition?t.dotPosition:t.vertical!==void 0&&t.vertical?"right":"bottom"),i=o.computed(()=>r.value==="left"||r.value==="right"),S=o.computed(()=>{const a="slick-dots";return c.default({[a]:!0,[`${a}-${r.value}`]:!0,[`${t.dotsClass}`]:!!t.dotsClass})});return()=>{const{dots:a,arrows:s,draggable:m,effect:h}=t,{class:u,style:C,...w}=v,N=h==="fade"?!0:t.fade,P=c.default(n.value,{[`${n.value}-rtl`]:p.value==="rtl",[`${n.value}-vertical`]:i.value,[`${u}`]:!!u},g.value);return T(o.createVNode("div",{class:P,style:C},[o.createVNode($.default,{ref:l,...t,...w,dots:!!a,dotsClass:S.value,arrows:s,draggable:m,fade:N,vertical:i.value},y)]))}}}),M=e.withInstall(k);exports.carouselProps=f;exports.default=M;
