let PropertyNodeBase=require("../Utils/PropertyNodeBase").PropertyNodeBase,CentralDataReset=require("../Utils/CentralDataReset").CentralDataReset;class CGSetComponentPropertyValue extends PropertyNodeBase{constructor(){super()}execute(e){var t=this.inputs[1]?this.inputs[1]():null;if(null===t||null===this.property||void 0===this.inputs[2]||null===this.propertyFunc)return this.nexts[0]&&this.nexts[0](),!1;let r=this.inputs[2]();return null!==r||"Mesh"!==this.valueType&&"Material"!==this.valueType&&"Texture2D"!==this.valueType&&"Texture"!==this.valueType||(r=this.resource),this.propertyFunc.registerToCentralResetter?this.propertyFunc.registerToCentralResetter([t],this.property,this.valueType):CentralDataReset.getInstance().registerPropertyResetCallbacksIfNotExistAutoMode(t,[this.property],{objectSetter:(e,t,r)=>{this.propertyFunc&&this.propertyFunc.setProperty&&this.propertyFunc.setProperty([e],t,r,this.valueType)},objectGetter:(e,t)=>{if(this.propertyFunc&&this.propertyFunc.getProperty)return this.propertyFunc.getProperty([e],t,this.valueType)}}),this.propertyFunc.setProperty([t],this.property,r,this.valueType),this.propertySetingFun&&this.propertySetingFun(t),this.nexts[0]&&this.nexts[0](),!0}}exports.CGSetComponentPropertyValue=CGSetComponentPropertyValue;