import type Color from "../../Color.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { ColorLike } from "../../Color.js";

export interface ColormapInfoProperties extends Partial<Pick<ColormapInfo, "label" | "value">> {
  /**
   * The color of a given pixel. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string,
   * an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object.
   */
  color?: ColorLike;
}

/**
 * The ColormapInfo describes pixel value, RGB colors and labels to color the raster.
 * It is used with [RasterColormapRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterColormapRenderer.html) to color pixels
 * in [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html) and [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html).
 *
 * @since 4.16
 */
export default class ColormapInfo extends JSONSupport {
  constructor(properties?: ColormapInfoProperties);
  /**
   * The color of a given pixel. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string,
   * an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object.
   */
  get color(): Color;
  set color(value: ColorLike);
  /** The label for a given pixel value and color mapping. */
  accessor label: string | null | undefined;
  /** The raster pixel value. */
  accessor value: number;
}