define(["require","exports","@core/container_abstract","@login/interfaces/initial-state-interface"],function(require,exports,container_abstract_1,initial_state_interface_1){Object.defineProperty(exports,"__esModule",{value:true});var Container_actions;(function(Container_actions){Container_actions["DISCONNECT"]="DISCONNECT";Container_actions["ADD_TO_DIALOG_QUEUE"]="ADD_TO_DIALOG_QUEUE";Container_actions["ADD_TO_SNACKBAR_QUEUE"]="ADD_TO_SNACKBAR_QUEUE";})(Container_actions=exports.Container_actions||(exports.Container_actions={}));var Utils=(function(){function Utils(){} Utils.prototype.handleAction=function(view,action,obj){switch(action){case container_abstract_1.Container_actions.PROP_UPDATE:view._is_dirty=true;view.setState(obj.data,function(){obj.callback();});break;case Container_actions.ADD_TO_SNACKBAR_QUEUE:view.props.state_manager.setRunState(initial_state_interface_1.Initial_state_enum.snackbar_queue,[obj.data]);break;}};Utils.prototype.getAuthToken=function(view){view.props.state_manager.api.user_getAuthToken({user:view.state.email,password:view.state.password},false,function(o){view.setState({token:o.token},function(){view.submitForm();});},function(e){view.setState({errorMessage:e.data.errorMessage,submit_clicked:false});});};Utils.prototype.initState=function(view){view.setState({show_password:false});};return Utils;}());exports.default=Utils;});