/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../core/jsonMap","../../../core/JSONSupport","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/decorators/cast","../../../core/accessorSupport/decorators/enumeration","../../../core/accessorSupport/decorators/reader","../../../core/accessorSupport/decorators/subclass","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/extensions/serializableProperty/reader","../Field","./MapLayerSource","./QueryTableDataSource","./RasterDataSource","./TableDataSource"],(function(e,r,o,t,a,c,u,n,l,i,p,s,y,S,b,d,T,f,_){"use strict";var D,h;const L=t.strict()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});e.JoinTableDataSource=D=function(e){function o(r){var o;return(o=e.call(this,r)||this).type="join-table",o}r._inheritsLoose(o,e);var t=o.prototype;return t.readLeftTableSource=function(e,r,o){return J()(e,r,o)},t.castLeftTableSource=function(e){return y.ensureOneOfType(j(),e)},t.readRightTableSource=function(e,r,o){return J()(e,r,o)},t.castRightTableSource=function(e){return y.ensureOneOfType(j(),e)},t.clone=function(){var e,r;const{leftTableKey:o,rightTableKey:t,leftTableSource:a,rightTableSource:c,joinType:u}=this,n={leftTableKey:o,rightTableKey:t,leftTableSource:null!=(e=null==a?void 0:a.clone())?e:void 0,rightTableSource:null!=(r=null==c?void 0:c.clone())?r:void 0,joinType:u};return new D(n)},o}(a.JSONSupport),o.__decorate([i.enumeration({joinTable:"join-table"})],e.JoinTableDataSource.prototype,"type",void 0),o.__decorate([c.property({type:String,json:{write:!0}})],e.JoinTableDataSource.prototype,"leftTableKey",void 0),o.__decorate([c.property({type:String,json:{write:!0}})],e.JoinTableDataSource.prototype,"rightTableKey",void 0),o.__decorate([c.property({json:{write:!0}})],e.JoinTableDataSource.prototype,"leftTableSource",void 0),o.__decorate([p.reader("leftTableSource")],e.JoinTableDataSource.prototype,"readLeftTableSource",null),o.__decorate([l.cast("leftTableSource")],e.JoinTableDataSource.prototype,"castLeftTableSource",null),o.__decorate([c.property({json:{write:!0}})],e.JoinTableDataSource.prototype,"rightTableSource",void 0),o.__decorate([p.reader("rightTableSource")],e.JoinTableDataSource.prototype,"readRightTableSource",null),o.__decorate([l.cast("rightTableSource")],e.JoinTableDataSource.prototype,"castRightTableSource",null),o.__decorate([i.enumeration(L)],e.JoinTableDataSource.prototype,"joinType",void 0),e.JoinTableDataSource=D=o.__decorate([s.subclass("esri.layers.support.source.JoinTableDataSource")],e.JoinTableDataSource);let v=null;function J(){return v||(v=S.createTypeReader({types:j()})),v}let g=null;function j(){return g||(g={key:"type",base:null,typeMap:{"data-layer":e.DataLayerSource,"map-layer":d.MapLayerSource}}),g}const O={key:"type",base:null,typeMap:{"join-table":e.JoinTableDataSource,"query-table":T.QueryTableDataSource,raster:f.RasterDataSource,table:_.TableDataSource}};e.DataLayerSource=h=function(e){function o(r){var o;return(o=e.call(this,r)||this).type="data-layer",o}return r._inheritsLoose(o,e),o.prototype.clone=function(){const{fields:e,dataSource:r}=this;return new h({fields:e,dataSource:r})},o}(a.JSONSupport),o.__decorate([i.enumeration({dataLayer:"data-layer"})],e.DataLayerSource.prototype,"type",void 0),o.__decorate([c.property({type:[b],json:{write:!0}})],e.DataLayerSource.prototype,"fields",void 0),o.__decorate([c.property({types:O,json:{write:!0}})],e.DataLayerSource.prototype,"dataSource",void 0),e.DataLayerSource=h=o.__decorate([s.subclass("esri.layers.support.source.DataLayerSource")],e.DataLayerSource),e.DataLayerSource.from=y.ensureType(e.DataLayerSource),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
