{"version":3,"file":"AnimatedGradientBorder.PCqBLHHg.mjs","names":["__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","c","motion","useMotionValue","useTransform","animate","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BL70qLPA","ControlType","RenderTarget","AnimatedGradientBorder","props","startAngle","inset","isCanvas","angle","gradientStops","shineColor","borderColor","shineRange","value","init_AnimatedGradientBorder"],"sources":["https:/framerusercontent.com/modules/zIIymVGoACbGMaVbmnrw/UmFcP4qJd36gUlycbNKU/AnimatedGradientBorder.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useMotionValue,useTransform,animate}from\"framer-motion\";import{useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export default function AnimatedGradientBorder(props){const{shineColor,borderColor,shineRange}=props;const startAngle=props.randomize?0:props.startAngle;const inset=props.borderWidth;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const angle=useMotionValue(!isCanvas&&props.randomize?Math.random()*360:0);useEffect(()=>{if(!isCanvas){animate(angle,angle.get()+(props.direction==\"ccw\"?-360:360),{duration:props.duration,repeat:Infinity,ease:\"linear\"});}},[]);const gradientStops=props.shineStyle==\"sharp\"?props.direction==\"ccw\"?`${shineColor} 0, ${borderColor} ${shineRange}deg`:`${borderColor} ${360-shineRange}deg, ${shineColor} 360deg`:`${shineColor} 0, ${borderColor} ${shineRange/2}deg, ${borderColor} ${360-shineRange/2}deg,${shineColor} 360deg`;return /*#__PURE__*/ _jsx(motion.div,{style:{backgroundImage:isCanvas?`conic-gradient(from ${startAngle}deg, ${gradientStops})`:useTransform([angle],([value])=>`conic-gradient(from ${startAngle+value}deg, ${gradientStops})`),borderRadius:props.radiusIsMixed?`${props.radiusTopLeft}px ${props.radiusTopRight}px ${props.radiusBottomRight}px ${props.radiusBottomLeft}px`:`${props.radius}px`,...props.style},children:/*#__PURE__*/ _jsx(\"div\",{style:{position:\"absolute\",inset:inset,backgroundColor:props.fill,borderRadius:props.radiusIsMixed?`${props.radiusTopLeft-inset}px ${props.radiusTopRight-inset}px ${props.radiusBottomRight-inset}px ${props.radiusBottomLeft-inset}px`:`${props.radius-inset}px`}})});};AnimatedGradientBorder.displayName=\"Animated Gradient Border\";addPropertyControls(AnimatedGradientBorder,{borderWidth:{type:ControlType.Number,defaultValue:4,min:1,step:1,title:\"Width\"},shineStyle:{type:ControlType.Enum,defaultValue:\"sharp\",options:[\"smooth\",\"sharp\"],optionTitles:[\"Smooth\",\"Sharp\"],displaySegmentedControl:true,title:\"Style\"},shineRange:{type:ControlType.Number,defaultValue:45,min:1,max:180,step:1,unit:\"\\xb0\"},shineColor:{type:ControlType.Color,defaultValue:\"#6019FA\",title:\"Shine\"},borderColor:{type:ControlType.Color,defaultValue:\"#EDEDED\",title:\"Border\"},duration:{type:ControlType.Number,defaultValue:5,min:.1,description:\"Seconds to rotate 360\\xb0\"},direction:{type:ControlType.Enum,defaultValue:\"cw\",options:[\"cw\",\"ccw\"],optionTitles:[\"Clockwise\",\"Counterclockwise\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},randomize:{type:ControlType.Boolean,defaultValue:true,description:\"Random start angle.\"},startAngle:{type:ControlType.Number,defaultValue:0,min:-360,max:360,unit:\"\\xb0\",hidden:props=>props.randomize},fill:{type:ControlType.Color,defaultValue:\"#FFF\"},radius:{type:ControlType.FusedNumber,defaultValue:20,toggleKey:\"radiusIsMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"radiusTopLeft\",\"radiusTopRight\",\"radiusBottomRight\",\"radiusBottomLeft\",],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedGradientBorder\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"fram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