{"version":3,"file":"Carousel_Custom.LIqmFfdE.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/Es4g6JhrVbDCygD7QuYn/PBYQhPiSVYd8gk4PjK2Z/Carousel_Custom.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fill\n * @framerSupportedLayoutHeight fixed\n */export default function HeroCarousel(props){const{images=[],overlayTitle=\"MENU\",showOverlayTitle=true,autoPlayDuration=4,arrowColor=\"#FFFFFF\",arrowBgColor=\"rgba(0, 0, 0, 0.35)\",playPauseColor=\"#FFFFFF\",playPauseBgColor=\"rgba(0, 0, 0, 0.35)\",titleColor=\"#FFFFFF\",titleFont={fontFamily:\"Inter\",fontWeight:900}}=props;// Filter out empty image slots\nconst validImages=images.filter(img=>img&&img.trim()!==\"\");const displayImages=validImages.length>0?validImages.slice(0,5):[\"https://images.unsplash.com/photo-1513104890138-7c749659a591?auto=format&fit=crop&w=1600&q=80\",\"https://images.unsplash.com/photo-1534308983496-4fabb1a015ee?auto=format&fit=crop&w=1600&q=80\",\"https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?auto=format&fit=crop&w=1600&q=80\",\"https://images.unsplash.com/photo-1593560708920-61dd98c46a4e?auto=format&fit=crop&w=1600&q=80\",\"https://images.unsplash.com/photo-1574071318508-1cdbab80d002?auto=format&fit=crop&w=1600&q=80\"];const[currentIndex,setCurrentIndex]=useState(0);const[isPlaying,setIsPlaying]=useState(true);const timerRef=useRef(null);const nextSlide=()=>{setCurrentIndex(prev=>(prev+1)%displayImages.length);};const prevSlide=()=>{setCurrentIndex(prev=>(prev-1+displayImages.length)%displayImages.length);};const togglePlay=()=>{setIsPlaying(prev=>!prev);};useEffect(()=>{if(isPlaying&&displayImages.length>1){timerRef.current=window.setInterval(()=>{nextSlide();},autoPlayDuration*1e3);}return()=>{if(timerRef.current)clearInterval(timerRef.current);};},[isPlaying,currentIndex,autoPlayDuration,displayImages.length]);// Resolve Font object properties safely\nconst fontFamily=titleFont?.fontFamily||\"sans-serif\";const fontWeight=titleFont?.fontWeight||900;const fontStyle=titleFont?.fontStyle||\"normal\";return /*#__PURE__*/_jsxs(\"div\",{style:styles.container,children:[displayImages.map((src,index)=>{const isActive=index===currentIndex;return /*#__PURE__*/_jsx(\"div\",{style:{...styles.slide,backgroundImage:`url(${src})`,opacity:isActive?1:0,zIndex:isActive?1:0}},index);}),showOverlayTitle&&/*#__PURE__*/_jsx(\"div\",{style:{...styles.overlayTitle,color:titleColor,fontFamily,fontWeight,fontStyle},children:overlayTitle}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:prevSlide,\"aria-label\":\"Previous Slide\",style:{...styles.arrowButton,left:\"16px\",color:arrowColor,backgroundColor:arrowBgColor},children:\"❮\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:nextSlide,\"aria-label\":\"Next Slide\",style:{...styles.arrowButton,right:\"16px\",color:arrowColor,backgroundColor:arrowBgColor},children:\"❯\"}),/*#__PURE__*/_jsx(\"div\",{style:styles.bottomControlBar,children:/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:togglePlay,\"aria-label\":isPlaying?\"Pause Carousel\":\"Play Carousel\",style:{...styles.playPauseButton,color:playPauseColor,backgroundColor:playPauseBgColor},children:isPlaying?/*#__PURE__*/_jsx(\"span\",{style:styles.pauseIcon,children:\"❚❚\"}):/*#__PURE__*/_jsx(\"span\",{style:styles.playIcon,children:\"▶\"})})})]});}const styles={container:{position:\"relative\",width:\"100%\",height:\"100%\",minHeight:\"320px\",overflow:\"hidden\",backgroundColor:\"#000000\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:1},slide:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundSize:\"cover\",backgroundPosition:\"center\",transition:\"opacity 0.8s ease-in-out\"},overlayTitle:{position:\"relative\",zIndex:1,fontSize:\"48px\",letterSpacing:\"0.06em\",textTransform:\"uppercase\",textShadow:\"0px 2px 10px rgba(0,0,0,0.7)\",pointerEvents:\"none\",userSelect:\"none\"},arrowButton:{position:\"absolute\",top:\"50%\",transform:\"translateY(-50%)\",zIndex:1,width:\"38px\",height:\"38px\",borderRadius:\"50%\",border:\"none\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",fontSize:\"18px\",transition:\"background-color 0.2s ease, opacity 0.2s ease\"},bottomControlBar:{position:\"absolute\",bottom:\"16px\",zIndex:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},playPauseButton:{width:\"32px\",height:\"32px\",borderRadius:\"50%\",border:\"none\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",transition:\"background-color 0.2s ease\"},playIcon:{fontSize:\"12px\",marginLeft:\"2px\"},pauseIcon:{fontSize:\"10px\",letterSpacing:\"-1px\"}};addPropertyControls(HeroCarousel,{images:{type:ControlType.Array,title:\"Images (Up to 5)\",maxCount:5,control:{type:ControlType.Image}},showOverlayTitle:{type:ControlType.Boolean,title:\"Show Title\",defaultValue:true},overlayTitle:{type:ControlType.String,title:\"Title Text\",defaultValue:\"MENU\",hidden(props){return!props.showOverlayTitle;}},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultValue:{fontFamily:\"Inter\",fontWeight:900,fontStyle:\"normal\"},hidden(props){return!props.showOverlayTitle;}},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#FFFFFF\",hidden(props){return!props.showOverlayTitle;}},autoPlayDuration:{type:ControlType.Number,title:\"Interval (s)\",defaultValue:4,min:1,max:15,step:.5,displayStepper:true},arrowColor:{type:ControlType.Color,title:\"Arrow Icon Color\",defaultValue:\"#FFFFFF\"},arrowBgColor:{type:ControlType.Color,title:\"Arrow BG Color\",defaultValue:\"rgba(0, 0, 0, 0.35)\"},playPauseColor:{type:ControlType.Color,title:\"Play/Pause Icon\",defaultValue:\"#FFFFFF\"},playPauseBgColor:{type:ControlType.Color,title:\"Play/Pause BG\",defaultValue:\"rgba(0, 0, 0, 0.35)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HeroCarousel\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fill\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Carousel_Custom.map"],"mappings":"6MAGG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,SAAO,CAAC,EAAE,eAAa,OAAO,mBAAiB,GAAK,mBAAiB,EAAE,aAAW,UAAU,eAAa,sBAAsB,iBAAe,UAAU,mBAAiB,sBAAsB,aAAW,UAAU,YAAU,CAAC,WAAW,QAAQ,WAAW,GAAG,GAAG,EAClT,EAAY,EAAO,OAAO,GAAK,GAAK,EAAI,KAAK,IAAI,EAAE,EAAQ,EAAc,EAAY,OAAO,EAAE,EAAY,MAAM,EAAE,CAAC,EAAE,CAAC,gGAAgG,gGAAgG,gGAAgG,gGAAgG,+FAA+F,EAAO,CAAC,EAAa,GAAiBA,EAAS,CAAC,EAAO,CAAC,EAAU,GAAcA,EAAS,EAAI,EAAQ,EAASC,EAAO,IAAI,EAAQ,MAAc,CAAC,EAAgB,IAAO,EAAK,GAAG,EAAc,MAAM,CAAE,EAAQ,MAAc,CAAC,EAAgB,IAAO,EAAK,EAAE,EAAc,QAAQ,EAAc,MAAM,CAAE,EAAQ,MAAe,CAAC,EAAa,GAAM,CAAC,CAAI,CAAE,EAAE,OAAkB,GAAW,EAAc,OAAO,IAAG,EAAS,QAAQ,EAAO,gBAAgB,CAAC,EAAU,CAAE,EAAE,EAAiB,GAAG,OAAa,CAAI,EAAS,SAAQ,cAAc,EAAS,OAAO,CAAE,GAAI,CAAC,EAAU,EAAa,EAAiB,EAAc,MAAM,CAAC,EACzrC,IAAM,EAAW,GAAW,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