// 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/DataAggregation/setting/ChooseLayer.html":'\x3cdiv  style\x3d"height:40px"\x3e\r\n    \x3cdiv style\x3d"width:100%" data-dojo-attach-point\x3d"layerSelectorDiv"\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!./ChooseLayer.html dijit/_TemplatedMixin jimu/BaseWidgetSetting jimu/dijit/Popup jimu/dijit/LayerChooserFromMapWithDropbox dojo/Evented".split(" "),function(b,a,k,l,c,d,e,f,g,h){return b([e,h,d],{baseClass:"jimu-widget-critical-facilities-setting-chooseLayer",templateString:c,layerSelector:null,chooseFromLayerPopup:null,postCreate:function(){this.inherited(arguments);this._createPopUp()},_addLayerSelectors:function(){this.layerSelector=
new g({layerChooser:this.layerChooserFromMap});this.layerSelector.placeAt(this.layerSelectorDiv);this.layerSelector.startup();0<this.layerSelector.layerChooser.getAllItems().length&&this.layerSelector.setSelectedLayer(this.layerSelector.setSelectedLayer(this.layerSelector.layerChooser.getAllItems()[0].layerInfo.layerObject))},_createPopUp:function(){this._addLayerSelectors();this.chooseFromLayerPopup=new f({titleLabel:this.nls.addTargetLayersLabel,width:500,maxHeight:300,autoHeight:!0,"class":this.baseClass,
content:this,buttons:[{label:this.nls.ok,onClick:a.hitch(this,function(){this.emit("layerSelected",this.layerSelector.getSelectedItem().layerInfo);this.chooseFromLayerPopup.close()})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],onClick:a.hitch(this,function(){this.chooseFromLayerPopup.close()})}]})}})});