{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/T92WashNkA0omexWsxlC/RvTHdCsCodcAn5vbStpS/IconSlideshow.js"],
  "sourcesContent": ["// Slideshow that cycles through user-provided 64x64 icons, one at a time, switching every 0.1s, no controls or indicators\nimport{jsx as _jsx}from\"react/jsx-runtime\";import React,{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Icon Slideshow\n *\n * @framerIntrinsicWidth 64\n * @framerIntrinsicHeight 64\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function IconSlideshow(props){const{icons=[null],speed=.1,loopMode=\"infinite\",loopCount=1,style}=props;const[index,setIndex]=useState(0);const[loops,setLoops]=useState(0);const intervalRef=useRef(null);const iconCount=icons.length;useEffect(()=>{setIndex(0);setLoops(0);},[iconCount,loopMode,loopCount]);useEffect(()=>{if(iconCount<2)return;if(intervalRef.current)clearInterval(intervalRef.current);if(loopMode===\"count\"&&loopCount<=0)return;intervalRef.current=window.setInterval(()=>{startTransition(()=>{setIndex(i=>{const next=i+1;if(next>=iconCount){if(loopMode===\"infinite\"){setLoops(l=>l+1);return 0;}else{setLoops(l=>{if(l+1>=loopCount){if(intervalRef.current)clearInterval(intervalRef.current);return l+1;}else{return l+1;}});if(loops+1>=loopCount){return iconCount-1;}return 0;}}return next;});});},Math.max(50,speed*1e3));return()=>{if(intervalRef.current)clearInterval(intervalRef.current);};},[iconCount,speed,loopMode,loopCount,loops]);const icon=icons[index]||icons[0];return /*#__PURE__*/_jsx(\"div\",{style:{...style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:icon&&typeof icon===\"object\"&&\"type\"in icon?// If it's a React element, clone with size props if possible\n// Try to pass width/height if supported\n// Otherwise, just render as is\n// This will work for most SVG/icon components\n// @ts-ignore\nicon.type&&(icon.props?.width!==undefined||icon.props?.height!==undefined)?// @ts-ignore\n/*#__PURE__*/React.cloneElement(icon,{width:\"100%\",height:\"100%\",style:{width:\"100%\",height:\"100%\",maxWidth:\"100%\",maxHeight:\"100%\",display:\"block\",...icon.props?.style||{}}}):/*#__PURE__*/React.cloneElement(icon,{style:{width:\"100%\",height:\"100%\",maxWidth:\"100%\",maxHeight:\"100%\",display:\"block\",...icon.props?.style||{}}}):icon})});}addPropertyControls(IconSlideshow,{icons:{type:ControlType.Array,title:\"Icons\",control:{type:ControlType.ComponentInstance},defaultValue:[],maxCount:20},speed:{type:ControlType.Number,title:\"Speed (s)\",defaultValue:.1,min:.05,max:2,step:.01,unit:\"s\",displayStepper:false},loopMode:{type:ControlType.Enum,title:\"Loop\",options:[\"infinite\",\"count\"],optionTitles:[\"Infinite\",\"Count\"],defaultValue:\"infinite\",displaySegmentedControl:true},loopCount:{type:ControlType.Number,title:\"Loop Count\",defaultValue:1,min:1,max:100,step:1,displayStepper:true,hidden:({loopMode})=>loopMode!==\"count\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IconSlideshow\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"64\",\"framerIntrinsicWidth\":\"64\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IconSlideshow.map"],
  "mappings": "qKASkB,SAARA,EAA+BC,EAAM,CAAC,GAAK,CAAC,MAAAC,EAAM,CAAC,IAAI,EAAE,MAAAC,EAAM,GAAG,SAAAC,EAAS,WAAW,UAAAC,EAAU,EAAE,MAAAC,CAAK,EAAEL,EAAW,CAACM,EAAMC,CAAQ,EAAEC,EAAS,CAAC,EAAO,CAACC,EAAMC,CAAQ,EAAEF,EAAS,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,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,OAAO,UAAU,OAAO,QAAQ,QAAQ,GAAGA,EAAK,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,EAAeE,EAAM,aAAaF,EAAK,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,OAAO,UAAU,OAAO,QAAQ,QAAQ,GAAGA,EAAK,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,EAAEA,CAAI,CAAC,CAAC,CAAC,CAAE,CAACG,EAAoBxB,EAAc,CAAC,MAAM,CAAC,KAAKyB,EAAY,MAAM,MAAM,QAAQ,QAAQ,CAAC,KAAKA,EAAY,iBAAiB,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,YAAY,aAAa,GAAG,IAAI,IAAI,IAAI,EAAE,KAAK,IAAI,KAAK,IAAI,eAAe,EAAK,EAAE,SAAS,CAAC,KAAKA,EAAY,KAAK,MAAM,OAAO,QAAQ,CAAC,WAAW,OAAO,EAAE,aAAa,CAAC,WAAW,OAAO,EAAE,aAAa,WAAW,wBAAwB,EAAI,EAAE,UAAU,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,eAAe,GAAK,OAAO,CAAC,CAAC,SAAArB,CAAQ,IAAIA,IAAW,OAAO,CAAC,CAAC",
  "names": ["IconSlideshow", "props", "icons", "speed", "loopMode", "loopCount", "style", "index", "setIndex", "ye", "loops", "setLoops", "intervalRef", "pe", "iconCount", "ue", "window", "Z", "i", "next", "l", "icon", "p", "e", "addPropertyControls", "ControlType"]
}
