// 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/Geoprocessing/editors/FeatureSetResultEditor.html":'\x3cdiv\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"rendererTab"\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"popupConfigTab"\x3e\r\n    \x3cdiv style\x3d"margin: 10px"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"enablePopupNode"\x3e\x3c/div\x3e \x3clabel\x3e${nls.enablePopup}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/on dojo/text!./FeatureSetResultEditor.html dijit/_TemplatedMixin ../BaseEditor ./FeatureSetRendererEditor ../PopupConfig jimu/dijit/TabContainer jimu/dijit/CheckBox".split(" "),function(h,d,e,f,k,l,m,n,p,q,r){return h([m,l],{baseClass:"jimu-gp-editor-base jimu-gp-editor-fsrse",editorName:"FeatureSetResultEditor",templateString:k,featureSetRendererEditor:null,popupConfig:null,tab:null,args:null,constructor:function(a){this.args=d.mixin({},
a)},postCreate:function(){this.inherited(arguments);this.tab=new q({tabs:[{title:this.nls.renderer,content:this.rendererTab},{title:this.nls.popup,content:this.popupConfigTab}],isNested:!0});this.tab.placeAt(this.domNode);this.tab.startup();this.featureSetRendererEditor=new n(this.args);this.featureSetRendererEditor.placeAt(this.rendererTab);this.featureSetRendererEditor.startup();var a={};if(this.args&&this.args.param){this.args.param.defaultValue&&(a.fields=d.clone(this.args.param.defaultValue.fields||
[]));var b=this.args.param.popup;if(b){if(b.fields.length!==a.fields.length){var t=e.map(b.fields,function(c){return c.name});a.fields=e.map(a.fields,function(c){var u=0<=e.indexOf(t,c.name);c.visible=u;e.some(b.fields,function(g){if(g.name===c.name)return c.alias=g.alias||c.alias,!0});return c})}else a.fields=b.fields;a.title=b.title}}this.popupConfig=new p(a);this.popupConfig.placeAt(this.popupConfigTab);this.popupConfig.startup();this.own(f(this.popupConfig,"noVisibleField",d.hitch(this,function(){this.enablePopup.setValue(!1);
this.enablePopup.setStatus(!1)})));this.own(f(this.popupConfig,"hasVisibleField",d.hitch(this,function(){this.enablePopup.setStatus(!0)})));this.enablePopup=new r({checked:!this.args.param.popup||this.args.param.popup&&this.args.param.popup.enablePopup},this.enablePopupNode);this.enablePopup.startup()},destroy:function(){this.featureSetRendererEditor&&(this.featureSetRendererEditor.destroy(),this.featureSetRendererEditor=null);this.popupConfig&&(this.popupConfig.destroy(),this.popupConfig=null);this.inherited(arguments)},
getValue:function(){var a={renderer:null,popup:this.popupConfig.getConfig()};a.popup.enablePopup=this.enablePopup.checked?!0:!1;var b=this.featureSetRendererEditor.getValue();b&&(a.renderer=b.renderer);return a}})});