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";

/**
 * Properties that can be used to construct a [MinDurationOptions](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/) instance.
 *
 * @since 5.0
 */
export interface MinDurationOptionsProperties extends Partial<Pick<MinDurationOptions, "contextEnabled" | "minDuration">> {
  /**
   * Defines the color used to display areas where the cumulative shadow duration meets
   * [minDuration](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#minDuration). When
   * [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, this color displays areas where cumulative
   * sunlight duration meets [minDuration](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#minDuration). Areas with shorter duration are
   * displayed with zero opacity.
   *
   * @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/references/core/analysis/ShadowCast/MinDurationOptions/#contextEnabled) to true.
   * The default configuration shows shadows at one hour intervals as context for the visualization.
   *
   * @since 5.0
   * @see [contextEnabled](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#contextEnabled)
   */
  contextOptions?: DiscreteOptionsProperties;
}

/**
 * Configuration for the "min-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 MinDurationOptions extends Clonable {
  /** @since 5.0 */
  constructor(properties?: MinDurationOptionsProperties);
  /**
   * Defines the color used to display areas where the cumulative shadow duration meets
   * [minDuration](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#minDuration). When
   * [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, this color displays areas where cumulative
   * sunlight duration meets [minDuration](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#minDuration). Areas with shorter duration are
   * displayed with zero opacity.
   *
   * @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.
   * This context is only rendered when visualizing shadow duration.
   * The [contextOptions](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#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/references/core/analysis/ShadowCast/MinDurationOptions/#contextOptions)
   */
  accessor contextEnabled: boolean;
  /**
   * The configuration used when showing additional context by setting
   * [contextEnabled](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#contextEnabled) to true.
   * The default configuration shows shadows at one hour intervals as context for the visualization.
   *
   * @since 5.0
   * @see [contextEnabled](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/MinDurationOptions/#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 this value. When [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, this value is interpreted
   * as the minimum sunlight duration and areas with shorter sunlight duration will appear without sunlight.
   *
   * @default 4 * 3600 * 1000
   * @since 5.0
   */
  accessor minDuration: number;
}