{"version":3,"file":"CircularLogoCarousel_1.DatGhXOL.mjs","names":["useRef","useState","useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/YIPF33s90PD6ywVYiDOc/4UAATKZM4SouEDgepbI2/CircularLogoCarousel_1.js"],"sourcesContent":["// Circular logo animation component with mouse-controlled rotation\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useRef,useCallback,useMemo}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useMotionValue,useSpring}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CircularLogoCarousel(props){const{logos,radius,mobileRadius,logoSize,cornerRadius,spacing,rotationSensitivity,backgroundColor}=props;const containerRef=useRef(null);const[isHovered,setIsHovered]=useState(false);const lastMouseX=useRef(0);const isStatic=useIsStaticRenderer();const rotation=useMotionValue(0);const springRotation=useSpring(rotation,{stiffness:300,damping:30});// Determine if mobile based on container size\nconst isMobile=typeof window!==\"undefined\"?window.innerWidth<768:false;const currentRadius=isMobile?mobileRadius:radius;// Calculate logo positions with spacing\nconst logoPositions=useMemo(()=>{const logoCount=logos.length;if(logoCount===0)return[];const angleStep=(360-spacing*logoCount)/logoCount;return logos.map((logo,index)=>{const angle=index*(angleStep+spacing)-90// Start from top (0°)\n;const radian=angle*Math.PI/180;return{x:Math.cos(radian)*currentRadius,y:Math.sin(radian)*currentRadius,rotation:angle+90,logo};});},[logos,currentRadius,spacing]);const handleMouseMove=useCallback(event=>{if(!isHovered||isStatic)return;const currentMouseX=event.clientX;const deltaX=currentMouseX-lastMouseX.current;if(lastMouseX.current!==0){const rotationDelta=deltaX*rotationSensitivity;rotation.set(rotation.get()+rotationDelta);}lastMouseX.current=currentMouseX;},[isHovered,rotation,rotationSensitivity,isStatic]);const handleMouseEnter=useCallback(()=>{if(isStatic)return;setIsHovered(true);lastMouseX.current=0;},[isStatic]);const handleMouseLeave=useCallback(()=>{if(isStatic)return;setIsHovered(false);lastMouseX.current=0;},[isStatic]);const containerSize=(currentRadius+logoSize)*2+40// Extra padding\n;return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor,overflow:\"hidden\",cursor:isHovered?\"grab\":\"default\"},onMouseMove:handleMouseMove,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"relative\",width:containerSize,height:containerSize,rotate:springRotation},children:logoPositions.map((position,index)=>/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:\"50%\",top:\"50%\",width:logoSize,height:logoSize,x:position.x-logoSize/2,y:position.y-logoSize/2,rotate:position.rotation},children:/*#__PURE__*/_jsx(\"img\",{src:position.logo.image.src,alt:position.logo.image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"contain\",borderRadius:cornerRadius,backgroundColor:\"transparent\"},draggable:false})},index))})});}addPropertyControls(CircularLogoCarousel,{logos:{type:ControlType.Array,title:\"Logos\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Logo Image\"}}},defaultValue:[{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 1\"}},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 2\"}},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 3\"}},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 4\"}},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 5\"}},{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 6\"}},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 7\"}},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 8\"}},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 9\"}},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 10\"}},{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 11\"}},{image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Logo 12\"}},{image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Logo 13\"}},{image:{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Logo 14\"}},{image:{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Logo 15\"}},{image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo 16\"}}],maxCount:50},radius:{type:ControlType.Number,title:\"Desktop Radius\",defaultValue:200,min:50,max:500,step:10,unit:\"px\"},mobileRadius:{type:ControlType.Number,title:\"Mobile Radius\",defaultValue:120,min:30,max:300,step:10,unit:\"px\"},logoSize:{type:ControlType.Number,title:\"Logo Size\",defaultValue:60,min:20,max:150,step:5,unit:\"px\"},cornerRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Logo Spacing\",defaultValue:5,min:0,max:45,step:1,unit:\"\\xb0\"},rotationSensitivity:{type:ControlType.Number,title:\"Rotation Sensitivity\",defaultValue:.5,min:.1,max:2,step:.1},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CircularLogoCarousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CircularLogoCarousel_1.map"],"mappings":"sRAIG,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,QAAM,SAAO,eAAa,WAAS,eAAa,UAAQ,sBAAoB,mBAAiB,EAAY,EAAaA,EAAO,KAAK,CAAM,CAAC,EAAU,GAAcC,EAAS,GAAM,CAAO,EAAWD,EAAO,EAAE,CAAO,EAAS,GAAqB,CAAO,EAAS,EAAe,EAAE,CAAO,EAAe,EAAU,EAAS,CAAC,UAAU,IAAI,QAAQ,GAAG,CAAC,CACrU,EAAvD,IAAS,QAAY,EAAO,WAAW,IAAuC,EAAa,EAC3G,EAAcE,MAAY,CAAC,IAAM,EAAU,EAAM,OAAO,GAAG,IAAY,EAAE,MAAM,EAAE,CAAC,IAAM,GAAW,IAAI,EAAQ,GAAW,EAAU,OAAO,EAAM,KAAK,EAAK,IAAQ,CAAC,IAAM,EAAM,GAAO,EAAU,GAAS,GACzM,EAAO,EAAM,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,EAAO,CAAC,EAAc,EAAE,KAAK,IAAI,EAAO,CAAC,EAAc,SAAS,EAAM,GAAG,OAAK,EAAG,EAAG,CAAC,EAAM,EAAc,EAAQ,CAAC,CAAO,EAAgBC,EAAY,GAAO,CAAC,GAAG,CAAC,GAAW,EAAS,OAAO,IAAM,EAAc,EAAM,QAAc,EAAO,EAAc,EAAW,QAAQ,GAAG,EAAW,UAAU,EAAE,CAAC,IAAM,EAAc,EAAO,EAAoB,EAAS,IAAI,EAAS,KAAK,CAAC,EAAc,CAAE,EAAW,QAAQ,GAAgB,CAAC,EAAU,EAAS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