define(["require","exports"],function(require,exports){Object.defineProperty(exports,"__esModule",{value:true});var commonUtils={validateProperty:function(view,handler,property){var _a,_b;if(handler.preValidatePropertyHook===undefined){handler.preValidatePropertyHook=function(){};} if(handler.postValidatePropertyHook===undefined){handler.postValidatePropertyHook=function(){};} handler.preValidatePropertyHook(view,property);if(handler.propertyMissingOrInvalid(view,property)){view.setState((_a={},_a[property+"_error"]={error:true,helperText:(view.state["error_messages_with_property"]||{})[property]||"Required"},_a),handler.postValidatePropertyHook(view,property,false));} else{view.setState((_b={},_b[property+"_error"]={},_b),handler.postValidatePropertyHook(view,property,true));} return true;},propertyMissingOrInvalid:function(view,property){return!!(view.state['missing_params']||[]).filter(function(i){return property===i;}).length||!!(view.state['invalid_params']||[]).filter(function(i){return property===i;}).length;}};exports.default=commonUtils;});