import type Color from "../../Color.js";
import type DiscreteOptions from "./DiscreteOptions.js";
import type { ColorLike } from "../../Color.js";
import type { DiscreteOptionsProperties } from "./DiscreteOptions.js";
import type { Clonable } from "../../core/Clonable.js";

/** @since 5.0 */
export interface MinDurationOptionsProperties extends Partial<Pick<MinDurationOptions, "contextEnabled" | "minDuration">> {
  /**
   * Color of the shadow visualization. The areas with cumulative shadow time longer than the
   * [minDuration](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#minDuration) are displayed with this color.
   *
   * @default [255, 0, 0, 0.7]
   * @since 5.0
   */
  color?: ColorLike;
  /**
   * The configuration used when showing additional context by setting
   * [contextEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#contextEnabled) to true.
   * The default configuration will show the shadows at one hour intervals as context for the visualization.
   *
   * @since 5.0
   * @see [contextEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#contextEnabled)
   */
  contextOptions?: DiscreteOptionsProperties;
}

/**
 * Configuration for the "min-duration" mode of the [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCastAnalysis.html).
 *
 * @since 5.0
 * @see [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCastAnalysis.html)
 * @see [ShadowCastAnalysisView3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ShadowCastAnalysisView3D.html)
 * @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/arcgis-shadow-cast/)
 */
export default class MinDurationOptions extends Clonable {
  /** @since 5.0 */
  constructor(properties?: MinDurationOptionsProperties);
  /**
   * Color of the shadow visualization. The areas with cumulative shadow time longer than the
   * [minDuration](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#minDuration) are displayed with this color.
   *
   * @default [255, 0, 0, 0.7]
   * @since 5.0
   */
  get color(): Color;
  set color(value: ColorLike);
  /**
   * Whether to enable additional context showing discrete shadows at the same time as displaying the minimum duration.
   * The [contextOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#contextOptions) property is used to configure the visualization
   * of the discrete shadows when context is enabled.
   *
   * @default false
   * @since 5.0
   * @see [contextOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#contextOptions)
   */
  accessor contextEnabled: boolean;
  /**
   * The configuration used when showing additional context by setting
   * [contextEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#contextEnabled) to true.
   * The default configuration will show the shadows at one hour intervals as context for the visualization.
   *
   * @since 5.0
   * @see [contextEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-MinDurationOptions.html#contextEnabled)
   */
  get contextOptions(): DiscreteOptions;
  set contextOptions(value: DiscreteOptionsProperties);
  /**
   * Minimum shadow duration (in milliseconds). Shadows are only displayed in areas where the cumulative shadow duration
   * meets or exceeds this value. Areas with shorter shadow durations will appear without shadows.
   *
   * @default 4 * 3600 * 1000
   * @since 5.0
   */
  accessor minDuration: number;
}