// 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/Infographic/setting/dijitsSetting/_dijits/SeriesStyle/_SeriesStyleItem.html":'\x3cdiv style\x3d"width:100%;" class\x3d"field-color"\x3e\r\n   \x3cdiv data-dojo-attach-point\x3d"textContainer" class\x3d"flex-balance-shrink1 field-name"\x3e\r\n   \t\x3cdiv data-dojo-attach-point\x3d"textDiv" class\x3d"text-over field-name-div"\x3e\x3c/div\x3e\r\n   \x3c/div\x3e\r\n   \x3cdiv data-dojo-attach-point\x3d"rightPanel" class\x3d"field-color-right flex-balance-shrink1"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"colorDiv" class\x3d"color"\x3e\x3c/div\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"opacityDiv" class\x3d"opacity"\x3e\x3c/div\x3e\r\n   \x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare dojo/on dojo/_base/lang dojo/_base/html dojo/text!./_SeriesStyleItem.html ../ChartColorSetting dojo/Evented dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/form/HorizontalSlider jimu/utils dijit/form/RadioButton".split(" "),function(f,c,d,b,g,h,k,l,m,n,p,q){return f([l,m,n,k],{baseClass:"infographic-series-style-item",templateString:g,textVisible:!0,opacityVisible:!1,colorSingleMode:!0,postCreate:function(){this.inherited(arguments);this._ignoreEvent();
this._initDom();this._setOptions();this._careEvent()},setConfig:function(a){if(a)if(a.name){this._ignoreEvent();var e=a.label||a.name;this.textDiv.innerHTML=q.sanitizeHTML(e);this.textDiv.title=e;this.fieldName=a.name;if(a=a.style)this._setColor(a.color),"undefined"!==typeof a.opacity&&this._setOpacity(a.opacity);this._careEvent()}else console.error("Invalid config")},getConfig:function(){var a={style:{}};a.name=this.fieldName;a.label=this.textDiv.innerHTML;a.style.opacity=this._getOpacity();a.style.color=
this._getColor();return a},_initDom:function(){this.colorPicker=new h;this.own(c(this.colorPicker,"change",d.hitch(this,function(){this._onChange()})));this.colorPicker.placeAt(this.colorDiv);this.opacitySlider=new p({name:"slider",value:0,minimum:0,maximum:10,discreteValues:10,intermediateChanges:!1,showButtons:!1,style:"width: 71%;margin: auto -3px auto 5px;"});this.own(c(this.opacitySlider,"change",d.hitch(this,function(){this._onChange()})));this.opacitySlider.placeAt(this.opacityDiv)},_onChange:function(){if(!this.ignoreChangeEvents){var a=
this.getConfig();this.emit("change",a)}},_ignoreEvent:function(){this.ignoreChangeEvents=!0},_careEvent:function(){this.ignoreChangeEvents=!1},_setOptions:function(){this.setTextDisplay(this.textVisible);this.setOpacityDisplay(this.opacityVisible);this.setColorMode(this.colorSingleMode)},setTextDisplay:function(a){(this.textVisible=a)?this._showText():this._hideText()},setOpacityDisplay:function(a){(this.opacityVisible=a)?this._showOpacity():this._hideOpacity()},setColorMode:function(a){(this.colorSingleMode=
a)?this.colorPicker.setMode(!0):this.colorPicker.setMode(!1)},_getOpacity:function(){if(this.opacityVisible){var a=this.opacitySlider.get("value");return(a=parseInt(a,10))?a:0}},_getColor:function(){return this.colorPicker.getColors()},_showText:function(){b.addClass(this.rightPanel,"flex-lr-balance");b.removeClass(this.rightPanel,"flex-fill");b.setStyle(this.textContainer,"display","")},_hideText:function(){b.removeClass(this.rightPanel,"flex-lr-balance");b.addClass(this.rightPanel,"flex-fill");
b.setStyle(this.textContainer,"display","none")},_setOpacity:function(a){a=parseInt(a,10);if(!a||a<this.min)a=this.min;a>this.max&&(a=this.max);this.opacitySlider.set("value",a)},_setColor:function(a){this.colorPicker.setColorsAutomatically(a)},_showOpacity:function(){b.setStyle(this.opacityDiv,"display","flex")},_hideOpacity:function(){b.setStyle(this.opacityDiv,"display","none")}})});