import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";

export interface SunLightingProperties extends JSONSupportMixinProperties, Partial<Pick<SunLighting, "directShadowsEnabled" | "displayUTCOffset">> {
  /**
   * The current date and time of the simulated sun.
   * When setting the date, specifying the time zone is important, otherwise the time zone of the browser will be used.
   * This might lead to different lighting for users in different time zones.
   */
  date?: (Date | number | string);
}

/**
 * The sun lighting object is part of the [webscene/Environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Environment.html) and contains information relating to
 * how a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) is lit by the sun. This class contains all properties which can be persisted in a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html).
 *
 * @since 4.24
 * @see [Environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Environment.html)
 */
export default class SunLighting extends JSONSupport {
  constructor(properties?: SunLightingProperties);
  /**
   * The current date and time of the simulated sun.
   * When setting the date, specifying the time zone is important, otherwise the time zone of the browser will be used.
   * This might lead to different lighting for users in different time zones.
   */
  get date(): Date;
  set date(value: (Date | number | string));
  /**
   * Indicates whether to show shadows cast by the sun.
   * Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom
   * levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows`
   * property available on [ObjectSymbol3DLayer#castShadows](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows),
   * [FillSymbol3DLayer#castShadows](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows),
   * [ExtrudeSymbol3DLayer#castShadows](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows),
   * and [PathSymbol3DLayer#castShadows](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows).
   *
   * @default false
   */
  accessor directShadowsEnabled: boolean;
  /**
   * The UTC time zone offset in hours that should be displayed in the UI to represent the date.
   * This value does not have an impact on the actual lighting of the scene.
   */
  accessor displayUTCOffset: number | null | undefined;
  /** Indicates that the light source is simulated position of the sun. */
  get type(): "sun";
  /**
   * Creates a deep clone of this object.
   *
   * @returns Creates a new clone of the instance calling this method.
   */
  clone(): SunLighting;
}