{"version":3,"file":"CircularLayout.BSkBA364.mjs","names":[],"sources":["https:/framerusercontent.com/modules/HMyjsSr29z4KNcbdeAch/5vAXrL5fY2b9qI9tVehF/CircularLayout.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,animate,useMotionValue,useTransform}from\"framer-motion\";import{useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CircularLayout(props){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const{animation}=props;const angle=props.randomAngle?0:props.angle;const rotation=useMotionValue(!isCanvas&&props.randomize?Math.random()*360:0);useEffect(()=>{if(!isCanvas&&animation){animate(rotation,rotation.get()+(animation.direction===\"cw\"?360:-360),{type:\"tween\",duration:animation.duration,ease:\"linear\",repeat:Infinity});}},[animation]);const orientation=props.orientation;const layers=props.layers;const count=layers.length;let layout=[];for(let i=0;i<layers.length;i++){var _props_style;layout.push(/*#__PURE__*/_jsx(\"div\",{style:{display:\"contents\"},children:/*#__PURE__*/_jsx(LayoutItem,{angle:360/count*i+angle,distance:props.distance,unit:props.unit,orientation:props.orientation,rotationValue:rotation,pointerEvents:(_props_style=props.style)===null||_props_style===void 0?void 0:_props_style.pointerEvents,children:layers[i]})},i));}return /*#__PURE__*/_jsx(motion.div,{style:{position:\"relative\",overflow:props.overflow,rotate:useTransform(rotation,value=>`${value}deg`),...props.style},children:layout});}CircularLayout.displayName=\"Circular Layout\";addPropertyControls(CircularLayout,{layers:{type:ControlType.Array,control:{type:ControlType.ComponentInstance}},orientation:{type:ControlType.Enum,defaultValue:\"up\",options:[\"up\",\"in\",\"out\"],optionTitles:[\"Up\",\"In\",\"Out\"],displaySegmentedControl:true},randomAngle:{type:ControlType.Boolean,defaultValue:false},angle:{type:ControlType.Number,defaultValue:0,min:-360,max:360,unit:\"\\xb0\",hidden(props){return props.randomAngle;}},distance:{type:ControlType.Number,defaultValue:50,min:0},unit:{type:ControlType.Enum,defaultValue:\"px\",options:[\"px\",\"%\",\"vw\",\"vh\"],displaySegmentedControl:true},animation:{type:ControlType.Object,optional:true,icon:\"effect\",controls:{duration:{type:ControlType.Number,defaultValue:10,min:.1,step:.1,displayStepper:true,description:\"Seconds to rotate 360\\xb0\"},direction:{type:ControlType.Enum,defaultValue:\"cw\",options:[\"cw\",\"ccw\"],optionTitles:[\"Clockwise\",\"Counterclockwise\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"}}},overflow:{type:ControlType.Enum,defaultValue:\"visible\",options:[\"visible\",\"hidden\",\"auto\"],optionTitles:[\"Visible\",\"Hidden\",\"Scroll\"]}});function LayoutItem({children,angle,distance,unit,orientation,rotationValue,pointerEvents}){const transformBase=`rotate(${orientation==\"up\"?-angle:orientation==\"in\"?90:-90}deg)`;let transform=useTransform(rotationValue,value=>`${transformBase} rotate(${-value}deg)`);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,transform:`rotate(${angle}deg) translate(${distance}${unit})`,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:\"50%\",left:\"50%\",translate:\"-50% -50%\",transform:orientation==\"up\"?transform:transformBase,pointerEvents:pointerEvents!==null&&pointerEvents!==void 0?pointerEvents:\"auto\"},children:children})});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CircularLayout\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CircularLayout.map"],"mappings":"uPAGG,SAAwB,EAAe,EAAM,CAAC,IAAM,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAY,CAAC,aAAW,EAAY,EAAM,EAAM,YAAY,EAAE,EAAM,MAAY,EAAS,EAAe,CAAC,GAAU,EAAM,UAAU,KAAK,OA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