/**
 * A module for importing types used in WebScene modules.
 *
 * @since 4.33
 */
import type SliceAnalysis from "../analysis/SliceAnalysis.js";
import type FeatureReferenceGlobalId from "./support/FeatureReferenceGlobalId.js";
import type FeatureReferenceObjectId from "./support/FeatureReferenceObjectId.js";

/**
 * Options for updating a web scene from a view.
 *
 * @see [WebScene.updateFrom()](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#updateFrom)
 */
export interface WebSceneUpdateFromOptions {
  /**
   * Do not update the initial environment from the view.
   *
   * @default false
   */
  environmentExcluded?: boolean;
  /**
   * Do not update the initial viewpoint from the view.
   *
   * @default false
   */
  viewpointExcluded?: boolean;
  /**
   * Do not update the thumbnail from the view. If viewpointExcluded
   *   is set to `true`, then this will default also to `true`.
   *
   * @default false
   */
  thumbnailExcluded?: boolean;
  /**
   * The size
   *   of the thumbnail. Defaults to 600x400 (ratio 1.5:1). Note that the thumbnail size may currently not be larger than
   *   the size of the view.
   *
   * @default { width: 600, heigth: 400 }
   */
  thumbnailSize?: WebSceneThumbnailSize;
  /**
   * When `true`, the webscene's
   *   [WebScene.widgets](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#widgets) property will not be updated. When `false`, the definition of the
   *   first [TimeSlider](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html) assigned to the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) will be used to update
   *   the [WebScene.widgets](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#widgets) property.
   *
   * @default false
   */
  widgetsExcluded?: boolean;
}

/**
 * Options for updating a web scene thumbnail from a view.
 *
 * @see [WebScene.updateThumbnail()](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#updateThumbnail)
 */
export interface WebSceneUpdateThumbnailOptions {
  /**
   * The size
   *   of the thumbnail. Defaults to 600x400 (ratio 1.5:1). Note that the thumbnail size may currently not be larger than
   *   the size of the view.
   *
   * @default { width: 600, heigth: 400 }
   */
  size?: WebSceneThumbnailSize;
}

/**
 * Options for the thumbnail size when updating a web scene thumbnail from a view.
 *
 * @see [WebScene.updateFrom()](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#updateFrom)
 * @see [WebSceneUpdateFromOptions.thumbnailSize](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-types.html#WebSceneUpdateFromOptions)
 * @see [WebSceneUpdateThumbnailOptions.size](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-types.html#WebSceneUpdateThumbnailOptions)
 */
export interface WebSceneThumbnailSize {
  /** The width of the thumbnail. */
  width: number;
  /** The height of the thumbnail. */
  height: number;
}

export type WebSceneSliceAnalysis = SliceAnalysis;

export type FeatureReferenceIdUnion = FeatureReferenceObjectId | FeatureReferenceGlobalId;