import{c as a}from"./declarationMapper-YJJdbZ_c.js";import{L as l,R as n}from"./index-T8LZyOXI.js";import{b as r}from"./KHR_interactivity-BRnQ0PPJ.js";import"./index-BkylzejB.js";import"./objectModelMapping-D1pI71RW.js";class t extends r{constructor(i){super(i),this.config=i,this.condition=this.registerDataInput("condition",a),this.executionFlow=this._registerSignalOutput("executionFlow"),this.completed=this._registerSignalOutput("completed"),this._unregisterSignalOutput("out")}_execute(i,s){let o=this.condition.getValue(i);this.config?.doWhile&&!o&&this.executionFlow._activateSignal(i);let e=0;for(;o;){if(this.executionFlow._activateSignal(i),++e,e>=t.MaxLoopCount){l.Warn("FlowGraphWhileLoopBlock: Max loop count reached. Breaking.");break}o=this.condition.getValue(i)}this.completed._activateSignal(i)}getClassName(){return"FlowGraphWhileLoopBlock"}}t.MaxLoopCount=1e3;n("FlowGraphWhileLoopBlock",t);export{t as FlowGraphWhileLoopBlock};
