import type AlgorithmicColorRamp from "./AlgorithmicColorRamp.js";
import type ColorRamp from "./ColorRamp.js";
import type { ColorRampProperties } from "./ColorRamp.js";
import type { AlgorithmicColorRampProperties } from "./AlgorithmicColorRamp.js";

export interface MultipartColorRampProperties extends ColorRampProperties, Partial<Pick<MultipartColorRamp, "weights">> {
  /** Define an array of algorithmic color ramps used to generate the multi part ramp. */
  colorRamps?: AlgorithmicColorRampProperties[] | null;
}

/**
 * Creates a multipart color ramp to combine multiple continuous color ramps for use in raster
 * renderers. The MultipartColorRamp will try to use an equal number of colors from each member
 * ramp to create its colors.
 *
 * @since 4.0
 * @see [Sample - ImageryTileLayer - shaded relief renderer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-renderer/)
 */
export default class MultipartColorRamp extends ColorRamp {
  constructor(properties?: MultipartColorRampProperties);
  /** Define an array of algorithmic color ramps used to generate the multi part ramp. */
  get colorRamps(): AlgorithmicColorRamp[] | null | undefined;
  set colorRamps(value: AlgorithmicColorRampProperties[] | null | undefined);
  /**
   * A string value representing the color ramp type.
   *
   * @default "multipart"
   */
  get type(): "multipart";
  /**
   * Sets the proportional weight of each [colorRamp](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-MultipartColorRamp.html#colorRamps) within the multipart color ramp. This controls how much of the overall gradient each ramp occupies,
   * allowing for precise transitions between ramps based on the specified weights. If not specified, all ramps are assigned equal weight.
   *
   * @since 4.34
   */
  accessor weights: number[] | null | undefined;
  /**
   * Creates a deep clone of this object.
   *
   * @returns A deep clone of the [MultipartColorRamp](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-MultipartColorRamp.html) instance that
   * invoked this method.
   */
  clone(): MultipartColorRamp;
}