{"version":3,"file":"SwiperCarousel.CncLBRpf.mjs","names":["useState","_Fragment","Swiper","FreeMode","SwiperSlide"],"sources":["https:/framerusercontent.com/modules/65Qi4ljAajGCTykJDOxw/BLsu47qJj6WQEcoLKmLQ/SwiperCarousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState}from\"react\";import{Autoplay,FreeMode,EffectCreative}from\"swiper/modules\";import{Swiper,SwiperSlide}from\"swiper/react\";import{addPropertyControls,ControlType}from\"framer\";const CONTAINER_STYLES={};/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function SwiperCarousel({slides,delay,spaceBetween,loop,speed,showBullets}){const[activeSlide,setActiveSlide]=useState(0);const[slideProgress,setSlideProgress]=useState(0);const handleIndexChange=swiper=>{setActiveSlide(swiper.realIndex);};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:innerStyles}}),/*#__PURE__*/_jsx(\"link\",{rel:\"stylesheet\",href:\"https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css\"}),/*#__PURE__*/_jsx(Swiper,{loop:loop??false,spaceBetween:spaceBetween,modules:[Autoplay,FreeMode,EffectCreative],slidesPerView:1,speed:speed,effect:\"creative\",className:\"swiper-carousel\",onAutoplayTimeLeft:(swiper,timeLeft,percentage)=>{setSlideProgress(percentage);},onActiveIndexChange:swiper=>{setActiveSlide(swiper.realIndex);},creativeEffect:{prev:{opacity:0,translate:[0,0,-400]},next:{opacity:1,translate:[\"calc(100% + 30px)\",0,0]}},autoplay:{delay:delay,disableOnInteraction:false},children:slides.map((slide,index)=>/*#__PURE__*/_jsx(SwiperSlide,{style:{color:\"white\",width:\"100%\"},children:slide},index))}),/*#__PURE__*/_jsx(\"div\",{className:\"gradient-overlay\"}),slides.length>1&&showBullets&&/*#__PURE__*/_jsx(\"div\",{className:\"bullets-container\",children:slides.map((slide,index)=>/*#__PURE__*/_jsxs(\"div\",{className:`bullet ${activeSlide===index?\"active\":\"\"}`,children:[/*#__PURE__*/_jsx(\"span\",{className:\"background\"}),/*#__PURE__*/_jsx(\"span\",{className:\"progress\",style:{width:`${index===activeSlide?(slideProgress-1)*-100:100}%`}})]},`carousel-bullet-${index}`))})]});}SwiperCarousel.defaultProperties={delay:0,spaceBetween:16,loop:false,speed:1e3,slides:[\"a\",\"b\"]};addPropertyControls(SwiperCarousel,{speed:{type:ControlType.Number,min:0,max:2e3},spaceBetween:{type:ControlType.Number},delay:{type:ControlType.Number,min:0,max:5e4},loop:{type:ControlType.Boolean},slides:{type:ControlType.Array,control:{type:ControlType.ComponentInstance}},showBullets:{type:ControlType.Boolean,default:true}});const innerStyles=`\n                .swiper-carousel .swiper-wrapper {\n                    transition-timing-function: cubic-bezier(0.83, 0, 0.17, 1) !important;\n                }\n\n                .swiper-carousel .swiper-wrapper .swiper-slide,\n                .swiper-carousel .swiper-wrapper .swiper-slide > *,\n                .swiper-carousel .swiper-wrapper .swiper-slide *:nth-child(1)\n                 { width: 100%; }\n\n\n                 .swiper-carousel .swiper-wrapper .swiper-slide.swiper-slide-next div:first-of-type {\n                    opacity: 0 !important;\n                    transition: opacity 0.5s cubic-bezier(0.83, 0, 0.17, 1) 0.4s;\n                 }\n\n                 .swiper-carousel .swiper-wrapper .swiper-slide.swiper-slide-active div:first-of-type{\n                    opacity: 1 !important;\n                    transition: opacity 0.5s cubic-bezier(0.83, 0, 0.17, 1) 0.4s;\n                 }\n\n                .bullets-container {\n                    gap: 2px;\n                    left: 50%;\n                    z-index: 1;\n                    bottom: 40px;\n                    display: flex;\n                    position: absolute;\n                    transform: translateX(-50%);\n                }\n\n                @media (max-width: 1199px) {\n                    .bullets-container {\n                        bottom: 16px;\n                    }\n                }\n\n                .bullet {\n                    border: 0;\n                    padding: 0;\n                    width: 5px;\n                    height: 5px;\n                    overflow: hidden;\n                    position: relative;\n                    border-radius: 100px;\n                    background-color: transparent;\n                    transition: width 0.5s ease-out;\n                }\n                \n                .background {\n                    top: 0;\n                    left: 0;\n                    z-index: 0;\n                    width: 100%;\n                    height: 100%;\n                    opacity: 0.3;\n                    display: block;\n                    position: absolute;\n                    background-color: #ffffff;\n                }\n\n                .bullet.active {\n                    width: 47px;\n                }\n\n                .progress {\n                    top: 0;\n                    left: 0;\n                    width: 5px;\n                    z-index: 1;\n                    height: 100%;\n                    display: block;\n                    position: absolute;\n                    background: #ffffff;\n                    border-radius: 100px;\n                    transition: width linear;\n                }\n            `;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SwiperCarousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SwiperCarousel.map"],"mappings":"gaAMG,SAAwB,EAAe,CAAC,SAAO,QAAM,eAAa,OAAK,QAAM,cAAY,CAAC,CAAC,GAAK,CAAC,EAAY,EAAe,CAACA,EAAS,GAAQ,CAAC,EAAc,EAAiB,CAACA,EAAS,GAAuE,OAAoB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,EAAY,CAAC,EAAe,EAAK,OAAO,CAAC,IAAI,aAAa,KAAK,+DAA+D,EAAe,EAAKC,EAAO,CAAC,KAAK,GAAM,GAAmB,eAAa,QAAQ,CAAC,EAASC,EAAS,EAAe,CAAC,cAAc,EAAQ,QAAM,OAAO,WAAW,UAAU,kBAAkB,oBAAoB,EAAO,EAAS,IAAa,CAAC,EAAiB,EAAa,EAAC,oBAAoB,GAAQ,CAAC,EAAe,EAAO,UAAY,EAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK,CAAC,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