import{resetComponent as a}from"../../style/index.mjs";import"../../theme/internal.mjs";import c from"../../theme/util/genComponentStyleHook.mjs";import{merge as d}from"../../theme/util/statistic.mjs";const p=t=>{const{componentCls:i,antCls:e,carouselArrowSize:o,carouselDotOffset:n,marginXXS:s}=t,l=-o*1.25,r=s;return{[i]:{...a(t),".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${e}-radio-input, input${e}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${e}-radio-input, input${e}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:o,height:o,marginTop:-o/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:l,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:l,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:n},"&-top":{top:n,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:t.dotWidth,height:t.dotHeight,marginInline:r,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${t.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:t.dotHeight,padding:0,color:"transparent",fontSize:0,background:t.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${t.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-r,content:'""'}},"&.slick-active":{width:t.dotWidthActive,"& button":{background:t.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}}}},u=t=>{const{componentCls:i,carouselDotOffset:e,marginXXS:o}=t,n={width:t.dotHeight,height:t.dotWidth};return{[`${i}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:t.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:e},"&-right":{insetInlineEnd:e,insetInlineStart:"auto"},li:{...n,margin:`${o}px 0`,verticalAlign:"baseline",button:n,"&.slick-active":{...n,button:n}}}}}},g=t=>{const{componentCls:i}=t;return[{[`${i}-rtl`]:{direction:"rtl",".slick-dots":{[`${i}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${i}-vertical`]:{".slick-dots":{[`${i}-rtl&`]:{flexDirection:"column"}}}}]},k=c("Carousel",t=>{const{controlHeightLG:i,controlHeightSM:e}=t,o=d(t,{carouselArrowSize:i/2,carouselDotOffset:e/2});return[p(o),u(o),g(o)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});export{k as default};
