// 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:widgets/RelatedTableCharts/setting/ChartThemeSelector.html":'\x3cdiv style\x3d"width: 232px; position: relative;"\x3e\r\n    \x3cdiv class\x3d"esriCTselectedItemNode"  data-dojo-attach-event\x3d"onclick: _onDropDownClick"\x3e\r\n        \x3cdiv class\x3d"esriCTThemeItem"\x3e\r\n            \x3cdiv class\x3d"esriCTThemeChart" data-dojo-attach-point\x3d"selectedThemeChart"\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv  class\x3d"esriCTThemeName" data-dojo-attach-point\x3d"selectedThemeName"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"esriCTDropSelect jimu-float-trailing" data-dojo-attach-point\x3d"dropArrowNode"\r\n        data-dojo-attach-event\x3d"onclick: _onDropDownClick"\x3e\r\n        \x3cdiv class\x3d"jimu-icon jimu-icon-down-arrow-8"\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"esriCTThemeChooserList" data-dojo-attach-point\x3d"themeChooseNode" style\x3d"display: block"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"themeList"\x3e\r\n            \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare jimu/BaseWidgetSetting dijit/_WidgetsInTemplateMixin dojo/text!./ChartThemeSelector.html dojo/_base/lang dojox/charting/Chart2D dojo/on dojo/dom-style dojo/dom-attr dojo/dom-construct dojo/_base/array".split(" "),function(m,n,p,q,f,r,k,g,d,e,l){return m([n,p],{baseClass:"jimu-widget-RelatedTableCharts-setting",templateString:q,selectedTheme:null,themes:[],postCreate:function(){this._setThemes();this.themes&&0<this.themes.length&&(this.selectedTheme=f.clone(this.themes[0]),
this._createThemeList(),this.own(k(document.body,"click",f.hitch(this,function(){"none"!==g.get(this.themeChooseNode,"display")&&this.hideChooseNode()}))))},destroy:function(){this.inherited(arguments)},_setThemes:function(){this.themes=[{themeDisplayName:this.nls.ThemeSelector.themeAdobebricks,className:"dojox/charting/themes/Adobebricks",themeName:"Adobebricks"},{themeDisplayName:this.nls.ThemeSelector.themeAlgae,className:"dojox/charting/themes/Algae",themeName:"Algae"},{themeDisplayName:this.nls.ThemeSelector.themeBahamation,
className:"dojox/charting/themes/Bahamation",themeName:"Bahamation"},{themeDisplayName:this.nls.ThemeSelector.themeBlueDusk,className:"dojox/charting/themes/BlueDusk",themeName:"BlueDusk"},{themeDisplayName:this.nls.ThemeSelector.themeCubanShirts,className:"dojox/charting/themes/CubanShirts",themeName:"CubanShirts"},{themeDisplayName:this.nls.ThemeSelector.themeDesert,className:"dojox/charting/themes/Desert",themeName:"Desert"},{themeDisplayName:this.nls.ThemeSelector.themeDistinctive,className:"dojox/charting/themes/Distinctive",
themeName:"Distinctive"},{themeDisplayName:this.nls.ThemeSelector.themeDollar,className:"dojox/charting/themes/Dollar",themeName:"Dollar"},{themeDisplayName:this.nls.ThemeSelector.themeGrasshopper,className:"dojox/charting/themes/Grasshopper",themeName:"Grasshopper"},{themeDisplayName:this.nls.ThemeSelector.themeGrasslands,className:"dojox/charting/themes/Grasslands",themeName:"Grasslands"},{themeDisplayName:this.nls.ThemeSelector.themeGreySkies,className:"dojox/charting/themes/GreySkies",themeName:"GreySkies"},
{themeDisplayName:this.nls.ThemeSelector.themeHarmony,className:"dojox/charting/themes/Harmony",themeName:"Harmony"},{themeDisplayName:this.nls.ThemeSelector.themeIndigoNation,className:"dojox/charting/themes/IndigoNation",themeName:"IndigoNation"},{themeDisplayName:this.nls.ThemeSelector.themeIreland,className:"dojox/charting/themes/Ireland",themeName:"Ireland"},{themeDisplayName:this.nls.ThemeSelector.themeMiamiNice,className:"dojox/charting/themes/MiamiNice",themeName:"MiamiNice"},{themeDisplayName:this.nls.ThemeSelector.themeMinty,
className:"dojox/charting/themes/Minty",themeName:"Minty"},{themeDisplayName:this.nls.ThemeSelector.themePurpleRain,className:"dojox/charting/themes/PurpleRain",themeName:"PurpleRain"},{themeDisplayName:this.nls.ThemeSelector.themeRoyalPurples,className:"dojox/charting/themes/RoyalPurples",themeName:"RoyalPurples"},{themeDisplayName:this.nls.ThemeSelector.themeSageToLime,className:"dojox/charting/themes/SageToLime",themeName:"SageToLime"},{themeDisplayName:this.nls.ThemeSelector.themeTufte,className:"dojox/charting/themes/Tufte",
themeName:"Tufte"},{themeDisplayName:this.nls.ThemeSelector.themeWatersEdge,className:"dojox/charting/themes/WatersEdge",themeName:"WatersEdge"},{themeDisplayName:this.nls.ThemeSelector.themeWetlandText,className:"dojox/charting/themes/Wetland",themeName:"Wetland"},{themeDisplayName:this.nls.ThemeSelector.themePlotKitblue,className:"dojox/charting/themes/PlotKit/blue",themeName:"PlotKit.blue"},{themeDisplayName:this.nls.ThemeSelector.themePlotKitcyan,className:"dojox/charting/themes/PlotKit/cyan",
themeName:"PlotKit.cyan"},{themeDisplayName:this.nls.ThemeSelector.themePlotKitgreen,className:"dojox/charting/themes/PlotKit/green",themeName:"PlotKit.green"},{themeDisplayName:this.nls.ThemeSelector.themePlotKitorange,className:"dojox/charting/themes/PlotKit/orange",themeName:"PlotKit.orange"},{themeDisplayName:this.nls.ThemeSelector.themePlotKitpurple,className:"dojox/charting/themes/PlotKit/purple",themeName:"PlotKit.purple"},{themeDisplayName:this.nls.ThemeSelector.themePlotKitred,className:"dojox/charting/themes/PlotKit/red",
themeName:"PlotKit.red"}]},_onDropDownClick:function(b){"none"===g.get(this.themeChooseNode,"display")?(this.showChooseNode(),b.preventDefault(),b.stopPropagation()):this.hideChooseNode()},showChooseNode:function(){g.set(this.themeChooseNode,"display","")},hideChooseNode:function(){g.set(this.themeChooseNode,"display","none")},_createThemeList:function(){var b=[];l.forEach(this.themes,function(a){b.push(a.className)});require(b,f.hitch(this,function(){l.forEach(this.themes,f.hitch(this,function(a){var c=
e.create("div",{"class":"esriCTThemeItem",title:a.themeDisplayName},this.themeList);d.set(c,"themeDisplayName",a.themeDisplayName);d.set(c,"themeClass",a.className);d.set(c,"themeName",a.themeName);k(c,"click",f.hitch(this,function(){var t={themeDisplayName:d.get(c,"themeDisplayName"),className:d.get(c,"themeClass"),themeName:d.get(c,"themeName")};this.selectTheme(t)}));var h=e.create("div",{"class":"esriCTThemeChart"},c);var u=e.create("div",{"class":"esriCTThemeName"},c);h=e.create("div",{},h);
e.create("div",{className:"title",innerHTML:a.themeDisplayName},u);this._createChart(a.themeName,h)}));this.selectTheme(this.selectedTheme)}))},_createChart:function(b,a){a=e.create("div",{className:"chart"},a);a=new r(a);a.setTheme(f.getObject("dojox.charting.themes."+b));a.addPlot("default",{type:"Pie",radius:11,labels:!1,radGrad:"vml"===dojox.gfx.renderer?"fan":"native"});a.addSeries("Series A",[.35,.25,.42,.53,.69]);a.render()},selectTheme:function(b){this.selectedThemeChart&&e.empty(this.selectedThemeChart);
this.selectedTheme={themeDisplayName:b.themeDisplayName||b.themeName,className:b.className,themeName:b.themeName};this._createChart(b.themeName,this.selectedThemeChart);d.set(this.selectedThemeName,"innerHTML",this.selectedTheme.themeDisplayName);this.hideChooseNode();this.onThemeSelect(this.selectedTheme)},onThemeSelect:function(b){}})});