import { h as RichTypeBoolean } from './declarationMapper-28XjxVJv.esm.js';
import { k as FlowGraphExecutionBlock } from './KHR_interactivity-B-UMiVgm.esm.js';
import { g as RegisterClass } from './index-BquY1VPT.esm.js';
import './objectModelMapping-CKhwyjWl.esm.js';

/**
 * A block that evaluates a condition and activates one of two branches.
 */
class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
    constructor(config) {
        super(config);
        this.condition = this.registerDataInput("condition", RichTypeBoolean);
        this.onTrue = this._registerSignalOutput("onTrue");
        this.onFalse = this._registerSignalOutput("onFalse");
    }
    _execute(context) {
        if (this.condition.getValue(context)) {
            this.onTrue._activateSignal(context);
        }
        else {
            this.onFalse._activateSignal(context);
        }
    }
    /**
     * @returns class name of the block.
     */
    getClassName() {
        return "FlowGraphBranchBlock" /* FlowGraphBlockNames.Branch */;
    }
}
RegisterClass("FlowGraphBranchBlock" /* FlowGraphBlockNames.Branch */, FlowGraphBranchBlock);

export { FlowGraphBranchBlock };
//# sourceMappingURL=flowGraphBranchBlock-hgjSfY4Q.esm.js.map
