{"version":3,"file":"Gradient_Border.BUo7J2_T.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/luj2q9jm9YBji92T42sq/eKnv0oZXUSwxSppIUhR9/Gradient_Border.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\";/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Gradient_Border({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(Gradient_Border,{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\":\"Gradient_Border\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"200\",\"framerDisableUnlink\":\"*\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gradient_Border.map"],"mappings":"yOAQG,SAAwB,EAAgB,CAAC,QAAM,SAAO,WAAS,aAAW,UAAQ,OAAK,WAAS,QAAM,SAAO,CAAC,IAAM,EAAiBA,EAAO,IAAI,EAAO,CAAC,EAAY,GAAgBC,EAAS,CAAC,EAA+K,OAA7K,MAAc,CAAC,GAAG,EAAiB,QAAQ,CAAC,GAAK,CAAC,QAA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