import type Color from "../../Color.js";
import type Accessor from "../../core/Accessor.js";
import type VideoLayer from "../../layers/VideoLayer.js";
import type MapView from "../../views/MapView.js";
import type { PreviewsInfo, VideoState } from "../../layers/video/types.js";

export interface VideoPlayerViewModelProperties extends Partial<Pick<VideoPlayerViewModel, "followingMode" | "layer" | "seekLength" | "view">> {}

/**
 * The VideoPlayerViewModel class provides the logic for the [VideoPlayer](https://developers.arcgis.com/javascript/latest/references/core/widgets/VideoPlayer/) widget and [Video Player component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-video-player/).
 *
 * @since 4.30
 * @see [VideoPlayer](https://developers.arcgis.com/javascript/latest/references/core/widgets/VideoPlayer/) - _Deprecated since 4.33. Use the [Video Player component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-video-player/) instead._
 * @example
 * const videoPlayerViewModel = new VideoPlayerViewModel({
 *   layer: videoLayer,
 *   view
 * });,
 */
export default class VideoPlayerViewModel extends Accessor {
  constructor(properties?: VideoPlayerViewModelProperties);
  /** The amount of the video layer that has been buffered, in seconds. */
  get buffered(): number;
  /** The current time of the video layer, in seconds. */
  get currentTime(): number;
  /** The duration of the video layer, in seconds. */
  get duration(): number;
  /** Indicates whether the video layer has ended. */
  get ended(): boolean;
  /**
   * Determines which telemetry elements to follow when the video layer is playing.
   * The following telemetry elements are available:
   * * `follow-sensor`: Follows the sensor location.
   * * `follow-frame`: Follows the frame center.
   * * `follow-both`: Follows both the sensor location and the frame center.
   *
   * @default "follow-both"
   * @example
   * // Follow the sensor location.
   * videoPlayerViewModel.followingMode = "follow-sensor";
   */
  accessor followingMode: "follow-sensor" | "follow-frame" | "follow-both" | "none";
  /**
   * The [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/) to play.
   *
   * @example
   * // Set the video player view model's layer to a video layer.
   * videoPlayerViewModel.layer = videoLayer;
   */
  accessor layer: VideoLayer | null | undefined;
  /** The metadata associated with the video layer. */
  get metadata(): {
      missionInfo: Record<string, string>;
      platformInfo: Record<string, string>;
      frameInfo: Record<string, string>;
  } | null;
  /** Indicates whether the video layer is playing. */
  get playing(): boolean;
  /**
   * The number of seconds to seek forward or backward when the user clicks the seek forward or seek backward buttons.
   *
   * @default 10
   * @example
   * // Seek the video layer forward by 5 seconds.
   * videoPlayerViewModel.seekLength = 5;
   */
  accessor seekLength: number;
  /** The state of the video layer. */
  get state(): VideoState | "error";
  /**
   * The [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) in which the video layer is displayed.
   *
   * @example
   * // Set the video player view model's view to a map view.
   * videoPlayerViewModel.view = mapView;
   */
  accessor view: MapView | null | undefined;
  /**
   * Changes the color of the graphics drawn on the map to represent telemetry elements such as sensor location and frame.
   *
   * @param color - The color of the graphics
   * @example
   * // Change the video layer telemetry graphics color to red.
   * videoPlayerViewModel.changeGraphicsColor(new Color("red"));
   */
  changeGraphicsColor(color: Color): void;
  /**
   * Changes the playback speed of the video layer.
   *
   * @param speed - The playback speed of the video. A value of 1.0 is normal speed, 0.5 is half speed, and 2.0 is double speed.
   * @example
   * // Change the video layer playback speed to 2x.
   * videoPlayerViewModel.changePlaybackSpeed(2);
   */
  changePlaybackSpeed(speed: number): void;
  /**
   * Pauses the video layer.
   *
   * @example
   * // Pause the video layer.
   * videoPlayerViewModel.pause();
   */
  pause(): void;
  /**
   * Plays the video layer.
   *
   * @example
   * // Play the video layer.
   * videoPlayerViewModel.play();
   */
  play(): void;
  /**
   * Provides metadata about available preview thumbnails for the layer.
   *
   * @since 5.1
   */
  previewsInfo(): PreviewsInfo | null;
  /**
   * Seeks the video layer backward by the number of seconds specified by the [seekLength](https://developers.arcgis.com/javascript/latest/references/core/widgets/VideoPlayer/VideoPlayerViewModel/#seekLength) property.
   *
   * @see [seekLength](https://developers.arcgis.com/javascript/latest/references/core/widgets/VideoPlayer/VideoPlayerViewModel/#seekLength)
   * @example
   * // Seek the video layer backward by 20 seconds.
   * videoPlayerViewModel.seekLength = 20;
   * videoPlayerViewModel.seekBackward();
   */
  seekBackward(): void;
  /**
   * Seeks the video layer forward by the number of seconds specified by the [seekLength](https://developers.arcgis.com/javascript/latest/references/core/widgets/VideoPlayer/VideoPlayerViewModel/#seekLength) property.
   *
   * @see [seekLength](https://developers.arcgis.com/javascript/latest/references/core/widgets/VideoPlayer/VideoPlayerViewModel/#seekLength)
   * @example
   * // Seek the video layer forward by 20 seconds.
   * videoPlayerViewModel.seekLength = 20;
   * videoPlayerViewModel.seekForward();
   */
  seekForward(): void;
  /**
   * Seeks the video layer to the specified time.
   *
   * @param seekToTime - The time to seek to, in seconds.
   * @example
   * // Seek the video layer to 30 seconds.
   * videoPlayerViewModel.seekTo(30);
   */
  seekTo(seekToTime: number): void;
  /**
   * Seeks the video layer to the beginning.
   *
   * @example
   * // Seek the video layer to the beginning.
   * videoPlayerViewModel.seekToBeginning();
   */
  seekToBeginning(): void;
  /**
   * Seeks the video layer to the ending.
   *
   * @example
   * // Seek the video layer to the ending.
   * videoPlayerViewModel.seekToEnding();
   */
  seekToEnding(): void;
  /**
   * Toggles the frame center display.
   *
   * @example
   * // Toggle the frame center display.
   * videoPlayerViewModel.toggleFrameCenterDisplay();
   */
  toggleFrameCenterDisplay(): void;
  /**
   * Toggles the video frame image draped on the map.
   *
   * @example
   * // Toggle the frame display.
   * videoPlayerViewModel.toggleFrameDisplay();
   */
  toggleFrameDisplay(): void;
  /**
   * Toggles the frame outline display.
   *
   * @example
   * // Toggle the frame outline display.
   * videoPlayerViewModel.toggleFrameOutlineDisplay();
   */
  toggleFrameOutlineDisplay(): void;
  /**
   * Toggles the loop playback setting.
   *
   * @since 5.1
   * @example
   * ```js
   * videoPlayerViewModel.toggleLoopPlayback();
   * ```
   */
  toggleLoopPlayback(): void;
  /**
   * Toggles the sensor display.
   *
   * @example
   * // Toggle the sensor display.
   * videoPlayerViewModel.toggleSensorDisplay();
   */
  toggleSensorDisplay(): void;
  /**
   * Toggles the sensor path display.
   *
   * @since 5.1
   * @example
   * // Toggle the sensor path display.
   * videoPlayerViewModel.toggleSensorPathDisplay();
   */
  toggleSensorPathDisplay(): void;
  /**
   * Toggles the sensor sight line display.
   *
   * @example
   * // Toggle the sensor sight line display.
   * videoPlayerViewModel.toggleSensorSightLineDisplay();
   */
  toggleSensorSightLineDisplay(): void;
  /**
   * Toggles the sensor trail display.
   *
   * @example
   * // Toggle the sensor trail display.
   * videoPlayerViewModel.toggleSensorTrailDisplay();
   */
  toggleSensorTrailDisplay(): void;
}