{"version":3,"file":"CircularLayout.DBmkHxbu.mjs","names":["__esmMin","init_npm_react_18_3_1","c","init_jsx_runtime","ce","useMotionValue","useTransform","animate","init_framer_motion_DhsWWWsN","motion","addPropertyControls","init_framer_DcxuU94H","RenderTarget","ControlType","CircularLayout","isCanvas","props","angle","rotation","animation","layers","count","layout","i","LayoutItem","value","transformBase","orientation","transform","rotationValue","distance","unit","pointerEvents","init_CircularLayout"],"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__\":{\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