import{c as a}from"./declarationMapper-Lanf6XPr.js";import{L as l,R as n}from"./index-CDrXokXW.js";import{b as r}from"./KHR_interactivity-BtMudStn.js";import"./index-DWyDLubb.js";import"./objectModelMapping-CGWnurZP.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};
