import { c as FlowGraphExecutionBlockWithOutSignal } from './KHR_interactivity-BGk_Crki.esm.js';
import { R as RichTypeAny, d as RichTypeNumber } from './declarationMapper-CyxdrUFP.esm.js';
import { R as RegisterClass } from './index-BvJBnIUK.esm.js';
import './objectModelMapping-BtiDAwYm.esm.js';

/** This file must only contain pure code and pure imports */
/**
 * @experimental
 * A block that sets the motion type of a physics body.
 *
 * The motion type input is a number corresponding to the PhysicsMotionType enum:
 * - 0 = STATIC (not moving, not affected by forces)
 * - 1 = ANIMATED (not affected by other bodies, but pushes them)
 * - 2 = DYNAMIC (fully simulated, affected by forces and collisions)
 */
class FlowGraphSetPhysicsMotionTypeBlock extends FlowGraphExecutionBlockWithOutSignal {
    /**
     * Constructs a new FlowGraphSetPhysicsMotionTypeBlock.
     * @param config - optional configuration for the block
     */
    constructor(config) {
        super(config);
        this.body = this.registerDataInput("body", RichTypeAny);
        this.motionType = this.registerDataInput("motionType", RichTypeNumber, 2 /* PhysicsMotionType.DYNAMIC */);
    }
    /**
     * @internal
     */
    _execute(context, _callingSignal) {
        const physicsBody = this.body.getValue(context);
        if (!physicsBody) {
            this._reportError(context, "No physics body provided");
            this.out._activateSignal(context);
            return;
        }
        physicsBody.setMotionType(this.motionType.getValue(context));
        this.out._activateSignal(context);
    }
    /**
     * @returns class name of the block.
     */
    getClassName() {
        return "FlowGraphSetPhysicsMotionTypeBlock" /* FlowGraphBlockNames.PhysicsSetMotionType */;
    }
}
let _Registered = false;
/**
 * Register side effects for flowGraphSetPhysicsMotionTypeBlock.
 * Safe to call multiple times; only the first call has an effect.
 */
function RegisterFlowGraphSetPhysicsMotionTypeBlock() {
    if (_Registered) {
        return;
    }
    _Registered = true;
    RegisterClass("FlowGraphSetPhysicsMotionTypeBlock" /* FlowGraphBlockNames.PhysicsSetMotionType */, FlowGraphSetPhysicsMotionTypeBlock);
}

/**
 * Re-exports pure implementation and applies runtime side effects.
 * Import flowGraphSetPhysicsMotionTypeBlock.pure for tree-shakeable, side-effect-free usage.
 */
RegisterFlowGraphSetPhysicsMotionTypeBlock();

export { FlowGraphSetPhysicsMotionTypeBlock, RegisterFlowGraphSetPhysicsMotionTypeBlock };
//# sourceMappingURL=flowGraphSetPhysicsMotionTypeBlock-C93jq_h1.esm.js.map
