import type { JSONSupport, JSONSupportMixinProperties } from "../../../core/JSONSupport.js";

export interface RasterDataSourceProperties extends JSONSupportMixinProperties, Partial<Pick<RasterDataSource, "dataSourceName" | "workspaceId">> {}

/**
 * A file-based raster that resides in a registered raster workspace. The raster may
 * only be displayed in the view, not queried or assigned a renderer.
 *
 * @see [Sample - MapImageLayer: raster data source](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-raster/)
 * @see [ArcGIS REST API - Data source object](https://developers.arcgis.com/documentation/common-data-types/data-source-object.htm)
 * @example
 * let layer = new MapImageLayer({
 *   url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Elevation/GlacierBay/MapServer",
 *   sublayers: [{
 *     title: "slope",
 *     opacity: 0.75,
 *     source: {
 *       type: "data-layer",
 *       dataSource: {
 *         type: "raster",
 *         workspaceId: "MyDatabaseWorkspaceIDSSR2",
 *         dataSourceName: "slope.tiff"
 *       }
 *     }
 *   }]
 * });
 */
export default abstract class RasterDataSource extends JSONSupport {
  /** The name of the raster in the registered workspace. */
  accessor dataSourceName: string;
  /** This value is always `raster`. */
  get type(): "raster";
  /** The workspace where the raster resides as defined in the ArcGIS Server Manager. */
  accessor workspaceId: string;
}