"use strict";define(["app","handlebars","View","text!/v2/webapps/FirstAccess/AdminSettings/ChartLockMessagePopup/Templates/ChartLockMessagePopupTemplate.html","utils"],function(d,f,e,c,b){var a=e.extend({id:"chartLockMessagePopup",overlay:null,chartLockMessagePopupTemplate:f.compile(c),events:{"click .excpApply-btn":"Apply","click .excpSave-btn":"Save","click .excpCancel-btn":"Cancel"},Save:function(g){g.preventDefault();this.trigger("view:validate",{overlay:this.overlay},this);if(this.validating===true){this.overlay.close();}},Apply:function(g){g.preventDefault();this.trigger("view:validate",{overlay:this.overlay});},Cancel:function(g){this.overlay.close();},initialize:function(g){e.prototype.initialize.apply(this,arguments);this.options=g||{};this.overlay=this.options.parent;this.validating=false;},render:function(g){e.prototype.render.apply(this,arguments);this.setParent(g.parent);d.instance().Cache.custMsgMode=g.mode;if(g.mode==="edit"){g.ExcpMessage=g.customMessage.CustomMessageText;g.LangCd=g.customMessage.LangCd;}else{if(g.mode==="add"){g.Id=0;g.ExcpMessage="";g.LangCd=0;}}this.$el.html(this.chartLockMessagePopupTemplate(g));this.overlay.render().$el.find("#overlay").html(this.$el);g.parent.$el.append(this.overlay.$el);this.delegateEvents();return this;}});return a;});