(function(){"use strict";u8.Crm.Widgets.ContactsSynchronizationTemplatePreviewPopup=function(t,e){$.extend(this,u8.Crm.Widgets.ContactsSynchronizationTemplatePreviewPopup.defaults,e);this.WidgetContainer();this.element=t;this.$=$w(t).$;this.id=u8.Base.Dom.uniqueId();this._popup=null;if(this.parent&&this.parent.children){this.parent.children.add(this)}};u8.Crm.Widgets.ContactsSynchronizationTemplatePreviewPopup.makeClass({name:"ContactsSynchronizationTemplatePreviewPopup",deriveFrom:u8.Base.Widgets.WidgetContainer,events:[]});u8.Crm.Widgets.ContactsSynchronizationTemplatePreviewPopup.defaults={popup:{allowResize:true,showArrow:true}};$.extend(u8.Crm.Widgets.ContactsSynchronizationTemplatePreviewPopup.prototype,{open:function(){var t=this;u8.using({texts:["ContactsSynchronization"]},function(){var e=$.extend(t.popup,{autoShow:false,parent:t,onCreate:t._onPopupCreate.bind(t),onClose:t._onPopupClose.bind(t),title:$t("TXT_ContactsSynchronization_3")});t._popup=new u8.Base.Widgets.Popup("<div></div>",e);t._popup.open()}.bind(this))},_onPopupCreate:function(t,e){this.model.id=this.id;this._popup.getContent().utml({url:"~/crm/ContactsSynchronizationTemplatePreviewPopup.utml.htm",itemOptions:{parent:this._popup},data:this.model});this._popup.show()},_onPopupClose:function(){this.dispose()},dispose:function(){if(this._isDisposed){return}this._popup=null;this.WidgetContainer_dispose();if(this.parent&&this.parent.children){this.parent.children.remove(this.id)}}})})();