// 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
define("dojo/on dojo/Evented dojo/_base/lang dojo/_base/html dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/_FrameworkDataSourceChooser".split(" "),function(c,e,a,d,f,g,h,k,l){return f([g,h,k,e],{baseClass:"jimu-dijit-framework-datasource-chooser-with-buttons",declaredClass:"jimu.dijit.FrameworkDataSourceChooserWithButtons",templateString:'\x3cdiv\x3e\x3cdiv class\x3d"chooser-container" data-dojo-attach-point\x3d"chooserContainer"\x3e\x3c/div\x3e\x3cdiv class\x3d"footer"\x3e\x3cdiv class\x3d"jimu-btn jimu-float-trailing cancel jimu-btn-vacation" data-dojo-attach-point\x3d"btnCancel"\x3e${nls.cancel}\x3c/div\x3e\x3cdiv class\x3d"jimu-btn jimu-float-trailing ok jimu-trailing-margin1 jimu-state-disabled" data-dojo-attach-point\x3d"btnOk"\x3e${nls.ok}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
appConfig:null,constructor:function(b){this.options=b},postMixInProperties:function(){this.nls=a.clone(window.jimuNls.common)},postCreate:function(){this.inherited(arguments);this.frameworkDataSourceChooser=new l({appConfig:this.options.appConfig});this.frameworkDataSourceChooser.placeAt(this.chooserContainer);d.setStyle(this.frameworkDataSourceChooser.domNode,{width:"100%",height:"100%"});this.own(c(this.frameworkDataSourceChooser,"tree-click",a.hitch(this,function(){0<this.getSelectedItems().length?
d.removeClass(this.btnOk,"jimu-state-disabled"):d.addClass(this.btnOk,"jimu-state-disabled")})));this.own(c(this.btnOk,"click",a.hitch(this,function(){var b=this.getSelectedItems();0<b.length&&this.emit("ok",b)})));this.own(c(this.btnCancel,"click",a.hitch(this,function(){this.emit("cancel")})))},getSelectedItems:function(){return this.frameworkDataSourceChooser.getSelectedItems()},startup:function(){this.inherited(arguments);this.frameworkDataSourceChooser.startup()}})});