let BaseNode=require("../Utils/BaseNode").BaseNode,CentralDataReset=require("../Utils/CentralDataReset").CentralDataReset;class CGSetEnable extends BaseNode{constructor(){super()}beforeStart(e){this.sys=e}resetOnRecord(e){var t=this.inputs[1]();this.updateSiblingFaceStretchComponentEnableState(t,t.enabled)}execute(e){var t,s;null!=this.inputs[1]&&(t=this.inputs[1](),s=this.inputs[2](),null!=t&&t.isInstanceOf("Component")?(this.updateSiblingFaceStretchComponentEnableState(t,s),t.isInstanceOf("JSScriptComponent")&&"js/FaceShapeController.js"===t.path&&(CentralDataReset.getInstance().registerPropertyResetCallbacksIfNotExistAutoMode(t,["isVisible"]),t.properties.set("isVisible",s)),CentralDataReset.getInstance().registerPropertyResetCallbacksIfNotExistAutoMode(t,["enabled"]),t.enabled=s,this.outputs[1]=s):this.outputs[1]=null),this.nexts[0]&&this.nexts[0]()}updateSiblingFaceStretchComponentEnableState(e,t){null!=e&&e.isInstanceOf("Component")&&(e.isInstanceOf("FaceStretchComponent")||e.isInstanceOf("JSScriptComponent")&&"js/LutFilter.js"===e.path)&&null!=(e=e.getSceneObject().getComponent("MeshRenderer"))&&(e.enabled=t)}}exports.CGSetEnable=CGSetEnable;