{"version":3,"file":"RotatingConicalGradient.D0HnR4o9.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","_e","c","init_jsx_runtime","ce","de","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_D6uXRwWs","ControlType","RotatingConicalGradient","conicGradientRef","aspectRatio","setAspectRatio","width","height","distance","angle","length","color","loop","eased","init_RotatingConicalGradient","props"],"sources":["https:/framerusercontent.com/modules/zbWnxj5hSHetHGpn1VoM/KkjHUHtYtzoU2jShqrRp/RotatingConicalGradient.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function RotatingConicalGradient({color,length,duration,repeatType,animate,loop,distance,angle,eased}){const conicGradientRef=useRef(null);const[aspectRatio,setAspectRatio]=useState(1);useEffect(()=>{if(conicGradientRef.current){const{width,height}=conicGradientRef.current.getBoundingClientRect();setAspectRatio(width/height);}},[conicGradientRef.current]);return /*#__PURE__*/ _jsx(motion.div,{ref:conicGradientRef,style:{display:\"grid\",alignItems:\"center\",color:\"white\",justifyItems:\"center\",width:\"100%\",height:\"100%\",background:`conic-gradient(from -55deg at ${distance/aspectRatio}% ${distance}% , transparent ${angle-(10+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`},initial:\"initial\",animate:{background:[`conic-gradient(from -55deg at ${distance/aspectRatio}% ${distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 35deg at ${100-distance/aspectRatio}% ${distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 125deg at ${100-distance/aspectRatio}% ${100-distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 215deg at ${distance/aspectRatio}% ${100-distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 310deg at ${distance/aspectRatio}% ${distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,]},transition:{duration,repeat:loop?Infinity:1,repeatType,ease:\"linear\",[eased&&\"times\"]:aspectRatio>1?[0,.25+.25/aspectRatio,.5,.75+.25/aspectRatio,1,]:[0,aspectRatio*.25,.5,.5+aspectRatio*.25,1,]}});};addPropertyControls(RotatingConicalGradient,{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ff5e5e\"},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:315,min:0,max:360,step:1},length:{type:ControlType.Number,title:\"Length\",defaultValue:10,min:1,max:100,step:1},distance:{type:ControlType.Number,title:\"Distance\",defaultValue:5,min:1,max:100,step:1},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:4,min:1,max:20,step:1},animate:{type:ControlType.Boolean,title:\"Animate Rotation\",defaultValue:true},eased:{type:ControlType.Boolean,title:\"Ease\",defaultValue:true},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true},repeatType:{type:ControlType.Enum,title:\"Replay Type\",defaultValue:\"loop\",options:[\"loop\",\"reverse\",\"mirror\"],optionTitles:[\"Loop\",\"Reverse\",\"Mirror\"],hidden(props){return!props.loop;}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingConicalGradient\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatingConicalGradient.map"],"mappings":"A,yOAA8K,SAAwBc,EAAwB,CAAC,QAAM,SAAO,WAAS,aAAW,UAAQ,OAAK,WAAS,QAAM,SAAO,CAAC,IAAMC,EAAiBf,EAAO,IAAI,EAAO,CAACgB,EAAYC,GAAgBhB,EAAS,CAAC,EAA+K,OAA7KM,MAAc,CAAC,GAAGQ,EAAiB,QAAQ,CAAC,GAAK,CAAC,QAAM,UAAQA,EAAiB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