import type PointCloudRenderer from "./PointCloudRenderer.js";
import type RendererLegendOptions from "./support/RendererLegendOptions.js";
import type ColorStop from "./visualVariables/support/ColorStop.js";
import type { PointCloudRendererProperties } from "./PointCloudRenderer.js";
import type { FieldTransformType } from "./support/pointCloud/types.js";
import type { RendererLegendOptionsProperties } from "./support/RendererLegendOptions.js";
import type { ColorStopProperties } from "./visualVariables/support/ColorStop.js";

export interface PointCloudStretchRendererProperties extends PointCloudRendererProperties, Partial<Pick<PointCloudStretchRenderer, "field" | "fieldTransformType">> {
  /**
   * An object providing options for displaying the renderer in the Legend.
   *
   * @since 4.6
   * @example
   * renderer.legendOptions = {
   *   title: "Elevation (high/low)",
   *   order: "descending-values",
   * };
   */
  legendOptions?: RendererLegendOptionsProperties | null;
  /**
   * An array of color value pairs. Points with values
   * between the specified stops are colorized with
   * linearly interpolated colors.
   *
   * @see [ColorVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html)
   */
  stops?: ColorStopProperties[] | null;
}

/**
 * PointCloudStretchRenderer defines the color of each point in a [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html)
 * based on the value of a numeric attribute. It allows you to easily map
 * continuous color ramps to minimum and maximum data values of one of the
 * layer's numeric attribute fields.
 *
 * @since 4.2
 * @see [Sample - PointCloudLayer with renderer](https://developers.arcgis.com/javascript/latest/sample-code/layers-pointcloud/)
 */
export default class PointCloudStretchRenderer extends PointCloudRenderer {
  constructor(properties?: PointCloudStretchRendererProperties);
  /** The name of the number field whose values are used to drive the continuous color visualization. */
  accessor field: string | null | undefined;
  /** A transform that is applied to the field value before evaluating the renderer. */
  accessor fieldTransformType: FieldTransformType | null | undefined;
  /**
   * An object providing options for displaying the renderer in the Legend.
   *
   * @since 4.6
   * @example
   * renderer.legendOptions = {
   *   title: "Elevation (high/low)",
   *   order: "descending-values",
   * };
   */
  get legendOptions(): RendererLegendOptions | null | undefined;
  set legendOptions(value: RendererLegendOptionsProperties | null | undefined);
  /**
   * An array of color value pairs. Points with values
   * between the specified stops are colorized with
   * linearly interpolated colors.
   *
   * @see [ColorVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html)
   */
  get stops(): ColorStop[] | null | undefined;
  set stops(value: ColorStopProperties[] | null | undefined);
  /** The type of Renderer. */
  get type(): "point-cloud-stretch";
  /**
   * Creates a deep clone of the renderer.
   *
   * @returns A deep clone
   * of the object that invoked this method.
   * @since 4.4
   * @example
   * // Creates a deep clone of the first layer's renderer
   * let renderer = view.map.layers.at(0).renderer.clone();
   */
  clone(): PointCloudStretchRenderer;
}