// 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/LaunchpadTheme/widgets/AnchorBarController/BaseIconItem.html":'\x3cdiv\x3e\r\n  \x3cdiv role\x3d"button" class\x3d"icon-item" data-dojo-attach-point\x3d"iconItemNode"\r\n       data-dojo-attach-event\x3d"onclick:_onNodeClick,onkeydown:_onNodeKeydown"\x3e\r\n    \x3cimg class\x3d"icon" src\x3d"${config.icon}" data-dojo-attach-point\x3d"imgNode"/\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"status" data-dojo-attach-point\x3d"iconItemStatus"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/dom-class dojo/dom-style dojo/on dojo/keys dojo/mouse dojo/Evented dijit/_WidgetBase dijit/_TemplatedMixin dijit/popup dijit/TooltipDialog dojo/text!./BaseIconItem.html".split(" "),function(k,c,e,b,l,f,g,h,m,n,p,d,q,r){return k([n,p,m],{baseClass:"jimu-anchorbar-iconitem jimu-float-leading",templateString:r,config:null,backgroundIndex:-1,isOpen:!1,panelIndex:-1,size:40,postCreate:function(){this.inherited(arguments);this.tooltipDialog=
new q({content:this.config.label,"class":"launchpad-tooltip"});window.isRTL&&this.config.mirrorIconForRTL&&b.add(this.imgNode,"jimu-flipx");e.setAttr(this.iconItemNode,"tabindex",this.itemTabIndex);e.setAttr(this.iconItemNode,"aria-label",this.config.label);b.add(this.iconItemNode,"icon-item-background"+this.getBackgroundColorIndex());this.own(f(this.iconItemNode,h.enter,c.hitch(this,function(){window.appInfo.isRunInMobile||d.open({parent:this,popup:this.tooltipDialog,around:this.iconItemNode,orient:["above-centered"],
onCancel:c.hitch(this,function(){d.close(this.tooltipDialog)})})})));this.own(f(this.iconItemNode,h.leave,c.hitch(this,function(){window.appInfo.isRunInMobile||d.close(this.tooltipDialog)})))},getConfigForPanel:function(){var a=c.clone(this.config);a.backgroundColor=this.getColor();a.panel.position=this._initPosition();a.panel.position.index=this.panelIndex;return a},_initPosition:function(){return{top:window.appInfo.isRunInMobile?20:120,left:10,width:350,height:480,margin:10}},_onNodeClick:function(){b.toggle(this.iconItemStatus,
"selected");b.toggle(this.iconItemNode,"selected");this.isOpen=b.contains(this.iconItemNode,"selected");this.isOpen||(this.panelIndex=-1);this.emit("nodeClick",{target:this})},_onNodeKeydown:function(a){a.keyCode!==g.ENTER&&a.keyCode!==g.SPACE||this._onNodeClick()},isGroup:function(){return this.config.widgets&&1<this.config.widgets.length?!0:!1},isOpenAtStart:function(){return this.config&&!0===this.config.openAtStart},setOpened:function(a){a?(this.iconItemStatus&&b.add(this.iconItemStatus,"selected"),
this.iconItemNode&&b.add(this.iconItemNode,"selected"),this.isOpen=!0):(this.iconItemStatus&&b.remove(this.iconItemStatus,"selected"),this.iconItemNode&&b.remove(this.iconItemNode,"selected"),this.isOpen=!1,this.panelIndex=-1)},getPanelIndex:function(){return this.panelIndex},setPanelIndex:function(a){this.panelIndex=a},getColor:function(){return l.get(this.iconItemNode,"background-color")||"#FFFFFF"},getBackgroundColorIndex:function(){return this.backgroundIndex%6}})});