// 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/_base/declare dojo/_base/lang dojo/_base/html dojo/Deferred dojo/aspect ./LayerInfoForDefault ./LayerObjectFacory esri/dijit/PopupTemplate".split(" "),function(e,c,f,d,g,h,k,l){return e(h,{_layerObjectFacory:null,constructor:function(){this.newSubLayers=[];this.isTable=!0;this._layerObjectFacory=new k(this)},init:function(){},_getLayerObject:function(){var a=new d;this._layerObjectFacory.getLayerObject().then(c.hitch(this,function(b){this.layerObject.empty&&b&&(this.layerObject=b,this._bindEventAfterLayerObjectLoaded());
a.resolve(b)}));return a},getLayerObject:function(){return this._getLayerObject()},getPopupInfoFromLayerObject:function(){var a=this.getPopupInfo();a||!this.layerObject||this.layerObject.empty||(a=this._getDefaultPopupInfo(this.layerObject));return a},loadPopupInfo:function(){var a=new d,b=this.getPopupInfo();b?a.resolve(b):this.getLayerObject().then(c.hitch(this,function(){b=this._getDefaultPopupInfo(this.layerObject);a.resolve(b)}));return a},getLayerType:function(){var a=new d;a.resolve("Table");
return a},isVisible:function(){return!1},isLeaf:function(){return!0},isRootLayer:function(){return!1},createLegendsNode:function(){return f.create("div",{"class":"legends-div"})},_initControlPopup:function(){this.inherited(arguments);this.controlPopupInfo={enablePopup:this.originOperLayer.popupInfo?!0:!1,infoTemplate:this.originOperLayer.popupInfo?new l(this.originOperLayer.popupInfo):null}},_bindEventAfterLayerObjectLoaded:function(){var a=g.after(this.layerObject,"setDefinitionExpression",c.hitch(this,
this._onFilterChanged));this._eventHandles.push(a)},getFilter:function(){if(this.layerObject&&!this.layerObject.empty&&this.layerObject.getDefinitionExpression){var a=this.layerObject.getDefinitionExpression();void 0===a&&(a=this.getFilterOfWebmap())}else a=this.getFilterOfWebmap();return a}})});