import type ImageryLayer from "../../../layers/ImageryLayer.js";
import type ImageryTileLayer from "../../../layers/ImageryTileLayer.js";
import type WCSLayer from "../../../layers/WCSLayer.js";
import type RasterFunction from "../../../layers/support/RasterFunction.js";
import type { AbortOptions } from "../../../core/promiseUtils.js";

/** @since 5.0 */
export interface RasterRendererParameters extends AbortOptions {
  /**
   * The
   *   input layer for which the renderer is generated. The
   *   [source type](https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/raster-dataset-properties.htm)
   *   of the raster must be `Vector-UV` or `Vector-MagDir`.
   *
   * @since 5.0
   */
  layer: RasterLayer;
  /**
   * Deprecated since 4.27. Use `rasterFunction` instead.
   *
   * @since 5.0
   */
  renderingRule?: RasterFunction;
  /**
   * Specifies the function for how the requested image
   *   should be processed. When `rasterFunction` is applied, the server returns updated service information that reflects custom
   *   processing as defined by the raster function. If not provided, the output renderer is created using the layer's `rasterFunction`.
   *
   * @since 5.0
   */
  rasterFunction?: RasterFunction | null;
  /**
   * Only applicable to multidimensional datasets where a raster layer can contain more than one variable
   *   (such as temperature, humidity, wind speed) with different statistics. Indicate the variable name here.
   *
   * @since 5.0
   */
  variableName?: string;
}

/** @since 5.0 */
export type RasterLayer = ImageryLayer | ImageryTileLayer | WCSLayer;