import { c as FlowGraphExecutionBlockWithOutSignal } from './KHR_interactivity-BGk_Crki.esm.js';
import { R as RichTypeAny, f as RichTypeVector3 } 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 angular velocity of a physics body.
 */
class FlowGraphSetAngularVelocityBlock extends FlowGraphExecutionBlockWithOutSignal {
    /**
     * Constructs a new FlowGraphSetAngularVelocityBlock.
     * @param config - optional configuration for the block
     */
    constructor(config) {
        super(config);
        this.body = this.registerDataInput("body", RichTypeAny);
        this.velocity = this.registerDataInput("velocity", RichTypeVector3);
    }
    /**
     * @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.setAngularVelocity(this.velocity.getValue(context));
        this.out._activateSignal(context);
    }
    /**
     * @returns class name of the block.
     */
    getClassName() {
        return "FlowGraphSetAngularVelocityBlock" /* FlowGraphBlockNames.PhysicsSetAngularVelocity */;
    }
}
let _Registered = false;
/**
 * Register side effects for flowGraphSetAngularVelocityBlock.
 * Safe to call multiple times; only the first call has an effect.
 */
function RegisterFlowGraphSetAngularVelocityBlock() {
    if (_Registered) {
        return;
    }
    _Registered = true;
    RegisterClass("FlowGraphSetAngularVelocityBlock" /* FlowGraphBlockNames.PhysicsSetAngularVelocity */, FlowGraphSetAngularVelocityBlock);
}

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

export { FlowGraphSetAngularVelocityBlock, RegisterFlowGraphSetAngularVelocityBlock };
//# sourceMappingURL=flowGraphSetAngularVelocityBlock-Cd0qRP-u.esm.js.map
