{"version":3,"file":"BlogImageCarousel.CDISTgVt.mjs","names":["useState","useMemo","useCallback","_Fragment","__esmMin","pe","init_npm_react_18_3_1","ne","te","l","_e","p","init_jsx_runtime","init_framer_BWFVvmND","addPropertyControls","useIsStaticRenderer","ControlType","BlogImageCarousel","props","isStaticRenderer","activeIndex","setActiveIndex","slides","image1","alt1","image2","alt2","image3","alt3","image4","alt4","image5","alt5","goToPrevious","prev","goToNext","goToSlide","index","currentSlide","maxHeight","backgroundColor","radius","controlColor","isActive","activeDotColor","dotColor","__FramerMetadata__","init_BlogImageCarousel","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerSupportedLayoutHeight\"","\"framerContractVersion\"","\"framerSupportedLayoutWidth\"","\"__FramerMetadata__\""],"sources":["https:/framerusercontent.com/modules/mqGjZA5gLKgUjdRuBplQ/ZZI13mMVw0BwBDMLlzaY/BlogImageCarousel.js"],"sourcesContent":["/**\n * User request: Create a new Framer code component named BlogImageCarousel for embedding inside CMS rich text with a compact five-image carousel, editable image/alt controls, previous/next buttons, dot indicators, portrait-friendly contain behavior, warm editorial styling, and SSR-safe behavior.\n */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{startTransition,useCallback,useMemo,useState}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function BlogImageCarousel(props){const{image1={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},image2={src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Gradient 2 - Purple\"},image3={src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Gradient 3 - Orange\"},image4={src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Gradient 4 - Yellow\"},image5={src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Gradient 5 - Green\"},alt1,alt2,alt3,alt4,alt5,radius,backgroundColor,controlColor,dotColor,activeDotColor,maxHeight}=props;const isStaticRenderer=useIsStaticRenderer();const[activeIndex,setActiveIndex]=useState(0);const slides=useMemo(()=>[{image:image1,alt:alt1},{image:image2,alt:alt2},{image:image3,alt:alt3},{image:image4,alt:alt4},{image:image5,alt:alt5}],[image1,image2,image3,image4,image5,alt1,alt2,alt3,alt4,alt5]);const goToPrevious=useCallback(()=>{startTransition(()=>{setActiveIndex(prev=>(prev-1+slides.length)%slides.length);});},[slides.length]);const goToNext=useCallback(()=>{startTransition(()=>{setActiveIndex(prev=>(prev+1)%slides.length);});},[slides.length]);const goToSlide=useCallback(index=>{startTransition(()=>{setActiveIndex(index);});},[]);const currentSlide=slides[activeIndex];return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",maxWidth:\"100%\",boxSizing:\"border-box\",display:\"flex\",flexDirection:\"column\",gap:10},role:\"region\",\"aria-label\":\"Blog image carousel\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",maxWidth:\"100%\",height:maxHeight,background:backgroundColor,borderRadius:radius,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"img\",{src:currentSlide.image?.src,srcSet:currentSlide.image?.srcSet,alt:currentSlide.alt||currentSlide.image?.alt||\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"contain\",objectPosition:\"center\",display:\"block\"}}),!isStaticRenderer&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:goToPrevious,\"aria-label\":\"Show previous image\",style:{position:\"absolute\",left:10,top:\"50%\",transform:\"translateY(-50%)\",width:30,height:30,border:\"none\",borderRadius:\"999px\",background:\"rgba(255,255,255,0.85)\",color:controlColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:16,lineHeight:1},children:\"‹\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:goToNext,\"aria-label\":\"Show next image\",style:{position:\"absolute\",right:10,top:\"50%\",transform:\"translateY(-50%)\",width:30,height:30,border:\"none\",borderRadius:\"999px\",background:\"rgba(255,255,255,0.85)\",color:controlColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:16,lineHeight:1},children:\"›\"})]})]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",display:\"flex\",justifyContent:\"center\",gap:8},\"aria-label\":\"Slide indicators\",children:slides.map((_,index)=>{const isActive=index===activeIndex;return /*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>goToSlide(index),\"aria-label\":`Go to image ${index+1}`,\"aria-current\":isActive?\"true\":undefined,style:{width:8,height:8,borderRadius:\"50%\",border:\"none\",padding:0,background:isActive?activeDotColor:dotColor,opacity:isActive?1:.8,cursor:\"pointer\"}},index);})})]});}addPropertyControls(BlogImageCarousel,{image1:{type:ControlType.ResponsiveImage,title:\"Image 1\"},alt1:{type:ControlType.String,title:\"Alt 1\",defaultValue:\"Screenshot 1\"},image2:{type:ControlType.ResponsiveImage,title:\"Image 2\"},alt2:{type:ControlType.String,title:\"Alt 2\",defaultValue:\"Screenshot 2\"},image3:{type:ControlType.ResponsiveImage,title:\"Image 3\"},alt3:{type:ControlType.String,title:\"Alt 3\",defaultValue:\"Screenshot 3\"},image4:{type:ControlType.ResponsiveImage,title:\"Image 4\"},alt4:{type:ControlType.String,title:\"Alt 4\",defaultValue:\"Screenshot 4\"},image5:{type:ControlType.ResponsiveImage,title:\"Image 5\"},alt5:{type:ControlType.String,title:\"Alt 5\",defaultValue:\"Screenshot 5\"},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"16px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},controlColor:{type:ControlType.Color,title:\"Controls\",defaultValue:\"#000000\"},dotColor:{type:ControlType.Color,title:\"Dot\",defaultValue:\"#CCCCCC\"},activeDotColor:{type:ControlType.Color,title:\"Active Dot\",defaultValue:\"#000000\"},maxHeight:{type:ControlType.Number,title:\"Max Height\",defaultValue:560,min:240,max:900,step:10,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogImageCarousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogImageCarousel.map"],"mappings":"A,qNAKG,SAAwBiB,EAAkB,EAAM,CAAC,GAAK,CAAC,SAAO,CAAC,IAAI,sEAAsE,IAAI,mBAAmB,EAAE,SAAO,CAAC,IAAI,oEAAoE,IAAI,qBAAqB,EAAE,SAAO,CAAC,IAAI,uEAAuE,IAAI,qBAAqB,EAAE,SAAO,CAAC,IAAI,oEAAoE,IAAI,qBAAqB,EAAE,SAAO,CAAC,IAAI,sEAAsE,IAAI,oBAAoB,EAAE,OAAK,OAAK,OAAK,OAAK,OAAK,SAAO,kBAAgB,eAAa,WAAS,iBAAe,aAAWC,EAAYC,EAAiBJ,EAAoB,EAAO,CAACK,EAAYC,GAAgBrB,EAAS,CAAC,EAAQsB,EAAOrB,MAAY,CAAC,CAAC,MAAMsB,EAAO,IAAIC,CAAI,EAAE,CAAC,MAAMC,EAAO,IAAIC,CAAI,EAAE,CAAC,MAAMC,EAAO,IAAIC,CAAI,EAAE,CAAC,MAAMC,EAAO,IAAIC,CAAI,EAAE,CAAC,MAAMC,EAAO,IAAIC,CAAI,CAAC,EAAE,CAACT,EAAOE,EAAOE,EAAOE,EAAOE,EAAOP,EAAKE,EAAKE,EAAKE,EAAKE,CAAI,CA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