// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"url:themes/DashboardTheme/widgets/Header/setting/SharedThemeChooserPopup.html":'\x3cdiv class\x3d"shared-theme-chooser-popup"\x3e\r\n  \x3cdiv class\x3d"btns-container"\x3e\r\n    \x3cdiv class\x3d"btn-itmes" data-dojo-attach-point\x3d"orgItem"\x3e\r\n      \x3cdiv class\x3d"btns jimu-float-leading" data-dojo-attach-point\x3d"org"\x3e${nls.sharedTheme}\x3c/div\x3e\r\n      \x3cdiv class\x3d"jimu-float-trailing disabled" data-dojo-attach-point\x3d"orgCheck"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"btn-itmes" data-dojo-attach-point\x3d"sharedItem"\x3e\r\n      \x3cdiv class\x3d"btns jimu-float-leading" data-dojo-attach-point\x3d"shared"\x3e${nls.themeColor}\x3c/div\x3e\r\n      \x3cdiv class\x3d"jimu-float-trailing " data-dojo-attach-point\x3d"sharedCheck"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"btn-itmes" data-dojo-attach-point\x3d"customItem"\x3e\r\n      \x3cdiv class\x3d"btns jimu-float-leading" data-dojo-attach-point\x3d"custom"\x3e${nls.custom}\x3c/div\x3e\r\n      \x3cdiv class\x3d"jimu-float-trailing " data-dojo-attach-point\x3d"customCheck"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/Evented dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/_base/lang dojo/_base/html dojo/on dijit/TooltipDialog dojo/text!./SharedThemeChooserPopup.html dijit/popup".split(" "),function(g,h,k,l,m,c,b,d,n,p,e){return h([k,l,m,g],{declaredClass:"shared-theme-chooser-popup",templateString:p,_DISAPPEAR_TIMER:null,_isTooltipDialogOpened:!1,placeAt:null,isPortalSupported:null,ACTION:null,postMixInProperties:function(){this.inherited(arguments);this.nls=
c.mixin(this.nls,builderNls);this.ACTION={ORG:"org",SHARED:"shared",CUSTOM:"custom"}},postCreate:function(){this.inherited(arguments);this._createTooltipDialog();this.isPortalSupported||b.addClass(this.orgItem,"no-support");this.own(d(this.orgItem,"click",c.hitch(this,function(a){a.stopPropagation();a.preventDefault();this.isPortalSupported&&this.orgClickHanlder(a)})));this.own(d(this.sharedItem,"click",c.hitch(this,function(a){a.stopPropagation();a.preventDefault();this.sharedClickHanlder(a)})));
this.own(d(this.customItem,"click",c.hitch(this,function(a){a.stopPropagation();a.preventDefault();this.customClickHanlder(a)})));this._hideTooltipDialog()},destroy:function(){e.close(this.tooltipDialog);this.tooltipDialog.destroy();this.inherited(arguments)},hideTooltipDialog:function(){this._hideTooltipDialog()},showTooltipDialog:function(){this._showTooltipDialog()},getTooltipDialog:function(){return this.tooltipDialog&&this.tooltipDialog.domNode?this.tooltipDialog:null},_showTooltipDialog:function(){!0!==
this._isTooltipDialogOpened&&(e.open({parent:this.placeAt||this.getParent(),popup:this.tooltipDialog,around:this.around}),this._isTooltipDialogOpened=!0,this.emit("showPopup"))},_hideTooltipDialog:function(){e.close(this.tooltipDialog);this._isTooltipDialogOpened=!1},_createTooltipDialog:function(){this.tooltipDialog=new n({content:this.domNode});b.addClass(this.tooltipDialog.domNode,"shared-theme-chooser-popup-container");var a=this.getTooltipDialog();this.own(d(a.domNode,"mouseover",c.hitch(this,
function(f){this.showPopup(f)})));this.own(d(a.domNode,"mouseleave",c.hitch(this,function(f){this.hidePopup(f)})))},orgClickHanlder:function(a){this.emit("btnClick",this.ACTION.ORG,a)},sharedClickHanlder:function(a){this.emit("btnClick",this.ACTION.SHARED,a)},customClickHanlder:function(a){this.emit("btnClick",this.ACTION.CUSTOM,a)},setChecked:function(a){b.removeClass(this.orgCheck,"check");b.removeClass(this.sharedCheck,"check");b.removeClass(this.customCheck,"check");a===this.ACTION.ORG&&this.isPortalSupported&&
b.addClass(this.orgCheck,"check");a===this.ACTION.SHARED&&b.addClass(this.sharedCheck,"check");a===this.ACTION.CUSTOM&&b.addClass(this.customCheck,"check")},showPopup:function(a){a&&(a.stopPropagation(),a.preventDefault());this._clearDisappearTimer();!1===this._isTooltipDialogOpened&&(this.showTooltipDialog(),this._isTooltipDialogOpened=!0)},hidePopup:function(a){a&&(a.stopPropagation(),a.preventDefault());this.hideTooltipDialog();this._isTooltipDialogOpened=!1},_clearDisappearTimer:function(){this._miniModeTimer&&
clearTimeout(this._miniModeTimer)}})});