import type Color from "../../Color.js";
import type { ColorLike } from "../../Color.js";
import type { ShadowCastTotalDurationMode } from "./types.js";
import type { Clonable } from "../../core/Clonable.js";

/** @since 5.0 */
export interface TotalDurationOptionsProperties extends Partial<Pick<TotalDurationOptions, "mode">> {
  /**
   * Color of the shadow visualization. The opacity is mapped to the time spent in shadow. Areas that don't receive any
   * shadow are displayed with zero opacity and areas that receive shadows for the entire time range are displayed
   * with the opacity specified in this property.
   *
   * @default [0, 0, 255, 0.7]
   * @since 5.0
   */
  color?: ColorLike;
}

/**
 * Configuration for the "total-duration" mode of the [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/).
 *
 * @since 5.0
 * @see [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/)
 * @see [ShadowCastAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/)
 * @see [Sample - Shadow Cast analysis](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/)
 * @see [Shadow Cast component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-shadow-cast/)
 */
export default class TotalDurationOptions extends Clonable {
  /** @since 5.0 */
  constructor(properties?: TotalDurationOptionsProperties);
  /**
   * Color of the shadow visualization. The opacity is mapped to the time spent in shadow. Areas that don't receive any
   * shadow are displayed with zero opacity and areas that receive shadows for the entire time range are displayed
   * with the opacity specified in this property.
   *
   * @default [0, 0, 255, 0.7]
   * @since 5.0
   */
  get color(): Color;
  set color(value: ColorLike);
  /**
   * Determines how cumulative shadow duration is visualized. Either as a `continuous` surface across the selected time
   * range or aggregated into discrete `hourly` intervals.
   *
   * @default "continuous"
   * @since 5.0
   */
  accessor mode: ShadowCastTotalDurationMode;
}