{"version":3,"file":"RotatingButton.C6ec5eBv.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/CIF8q7xboJYfT7wBdApe/HEcHNQ7ANzEaxBRV0jRy/RotatingButton.js"],"sourcesContent":["// Circular button with rotating black circle, controllable speed, circular text, and hover gradient effect\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion,useAnimation}from\"framer-motion\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Circular rotating button with text along border and gradient hover effect\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function RotatingButton(props){const{text=\"CIRCULAR BUTTON TEXT\",rotationSpeed=20,backgroundColor=\"#000000\",gradientStart=\"#FF6B6B\",gradientEnd=\"#4ECDC4\",textColor=\"#FFFFFF\",fontSize=14,onClick,style}=props;const[isHovered,setIsHovered]=useState(false);const controls=useAnimation();const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic)return;controls.start({rotate:360,transition:{duration:rotationSpeed,ease:\"linear\",repeat:Infinity}});},[controls,rotationSpeed,isStatic]);const handleMouseEnter=()=>{setIsHovered(true);};const handleMouseLeave=()=>{setIsHovered(false);};const size=Math.min(parseInt(style?.width)||200,parseInt(style?.height)||200);const radius=(size-40)/2;const circumference=2*Math.PI*radius;const textLength=text.length;const charSpacing=circumference/textLength;return /*#__PURE__*/_jsxs(motion.button,{style:{width:size,height:size,borderRadius:\"50%\",border:\"none\",cursor:\"pointer\",position:\"relative\",overflow:\"hidden\",padding:0,outline:\"none\",...style},animate:controls,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:onClick,whileTap:{scale:.95},children:[/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",borderRadius:\"50%\",position:\"absolute\",top:0,left:0},animate:{background:isHovered?`linear-gradient(45deg, ${gradientStart}, ${gradientEnd})`:backgroundColor},transition:{duration:.3,ease:\"easeInOut\"}}),/*#__PURE__*/_jsxs(\"svg\",{width:size,height:size,style:{position:\"absolute\",top:0,left:0,pointerEvents:\"none\"},children:[/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsx(\"path\",{id:\"circle-path\",d:`M ${size/2} 20 A ${radius} ${radius} 0 1 1 ${size/2-.1} 20`})}),/*#__PURE__*/_jsx(\"text\",{fontSize:fontSize,fill:textColor,fontWeight:\"500\",letterSpacing:\"2px\",style:{textTransform:\"uppercase\",fontFamily:\"system-ui, -apple-system, sans-serif\"},children:/*#__PURE__*/_jsx(\"textPath\",{href:\"#circle-path\",startOffset:\"0%\",textAnchor:\"start\",children:text})})]})]});}addPropertyControls(RotatingButton,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"CIRCULAR BUTTON TEXT\"},rotationSpeed:{type:ControlType.Number,title:\"Rotation Speed\",defaultValue:20,min:5,max:60,step:1,unit:\"s\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#000000\"},gradientStart:{type:ControlType.Color,title:\"Gradient Start\",defaultValue:\"#FF6B6B\"},gradientEnd:{type:ControlType.Color,title:\"Gradient End\",defaultValue:\"#4ECDC4\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:14,min:8,max:24,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatingButton.map"],"mappings":"4YAMG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,uBAAuB,gBAAc,GAAG,kBAAgB,UAAU,gBAAc,UAAU,cAAY,UAAU,YAAU,UAAU,WAAS,GAAG,UAAQ,QAAM,CAA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