/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as r}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import{ensureType as a}from"../../core/accessorSupport/ensureType.js";import s from"../../layers/support/Field.js";import p from"./JoinTableDataSource.js";import i from"./QueryTableDataSource.js";import c from"./RasterDataSource.js";import m from"./TableDataSource.js";import{registerDynamicDataLayerClass as u}from"./utils.js";import{enumeration as l}from"../../core/accessorSupport/decorators/enumeration.js";var y;const d={key:"type",base:null,typeMap:{"join-table":p,"query-table":i,raster:c,table:m}};let n=class extends e{static{y=this}constructor(r){super(r),this.type="data-layer"}clone(){const{fields:r,dataSource:e}=this;return new y({fields:r,dataSource:e})}};r([l({dataLayer:"data-layer"}),o({json:{write:{isRequired:!0}}})],n.prototype,"type",void 0),r([o({type:[s],json:{write:!0}})],n.prototype,"fields",void 0),r([o({types:d,json:{write:!0}})],n.prototype,"dataSource",void 0),n=y=r([t("esri.rest.layerSources.DynamicDataLayer")],n),n.from=a(n),u(n);export{n as default};
