{"version":3,"file":"Custom_Slideshow.D2KWEfMN.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/kqVBxr3rOKRfceL3jInW/XaaIaDRkqgAtI04f8RE8/Custom_Slideshow.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FixedSlideshow(props){const{images=[]}=props;const[currentIndex,setCurrentIndex]=useState(0);// Auto-play effect that changes slides every 3 seconds\nuseEffect(()=>{if(images.length<=1)return;// Don't auto-play if there's only one image\nconst timer=setInterval(()=>{setCurrentIndex(current=>current===images.length-1?0:current+1);},5e3);// Clean up timer when component unmounts\nreturn()=>clearInterval(timer);},[images.length]);const containerStyle={display:\"flex\",flexDirection:\"column\",gap:\"8px\",width:\"100%\",height:\"100%\"};// Updated main image container style with 4:5 aspect ratio for taller images\nconst mainImageStyle={width:\"100%\",aspectRatio:\"4/5\",overflow:\"hidden\",borderRadius:\"8px\",backgroundColor:\"#f3f4f6\",position:\"relative\"};const thumbnailContainerStyle={display:\"flex\",gap:\"6px\",// overflowX: \"auto\",\n// overflowY: \"hidden\",\n// padding: \"16px\",\nwidth:\"100%\",flexWrap:\"wrap\",msOverflowStyle:\"none\",scrollbarWidth:\"none\",\"::-webkit-scrollbar\":{display:\"none\"}};if(!images.length){return /*#__PURE__*/_jsx(\"div\",{style:{...containerStyle,justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsx(\"p\",{style:{color:\"#6b7280\"},children:\"Add images in property controls\"})});}return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:mainImageStyle,children:/*#__PURE__*/_jsx(\"img\",{src:images[currentIndex],alt:`Slide ${currentIndex+1}`,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",transition:\"opacity 0.5s ease-in-out\"}})}),/*#__PURE__*/_jsx(\"div\",{style:thumbnailContainerStyle,children:images.map((image,index)=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>setCurrentIndex(index),style:{width:\"70px\",height:\"70px\",flexShrink:0,borderRadius:\"4px\",overflow:\"hidden\",border:currentIndex===index?\"2px solid #3b82f6\":\"2px solid transparent\",transition:\"border-color 0.2s ease\",padding:0,cursor:\"pointer\"},children:/*#__PURE__*/_jsx(\"img\",{src:image,alt:`Thumbnail ${index+1}`,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}})},index))})]});}addPropertyControls(FixedSlideshow,{images:{type:ControlType.Array,control:{type:ControlType.Image},title:\"Images\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FixedSlideshow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Custom_Slideshow.map"],"mappings":"iRAAmJ,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,SAAO,EAAE,EAAE,EAAW,CAAC,EAAa,GAAiBA,EAAS,EAAE,CACvQ,MAAc,CAAC,GAAG,EAAO,QAAQ,EAAE,OACnC,IAAM,EAAM,gBAAgB,CAAC,EAAgB,GAAS,IAAU,EAAO,OAAO,EAAE,EAAE,EAAQ,EAAE,EAAG,IAAI,CACnG,UAAU,cAAc,EAAM,EAAG,CAAC,EAAO,OAAO,CAAC,CAAC,IAAM,EAAe,CAAC,QAAQ,OAAO,cAAc,SAAS,IAAI,MAAM,MAAM,OAAO,OAAO,OAAO,CAIgM,OAA7N,EAAO,OAA0O,EAAM,MAAM,CAAC,MAAM,EAAe,SAAS,CAAc,EAAK,MAAM,CAAC,MAHvZ,CAAC,MAAM,OAAO,YAAY,MAAM,SAAS,SAAS,aAAa,MAAM,gBAAgB,UAAU,SAAS,WAAW,CAGyT,SAAsB,EAAK,MAAM,CAAC,IAAI,EAAO,GAAc,IAAI,SAAS,EAAa,IAAI,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ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