import type MediaLayer from "../../layers/MediaLayer.js";
import type MediaLayerInteractionOptions from "../3d/layers/support/MediaLayerInteractionOptions.js";
import type { ResourceHandle } from "../../core/Handles.js";
import type { MediaElement } from "../../layers/support/media.js";
import type { LayerViewHighlightOptions } from "./types.js";
import type { MediaLayerInteractionOptionsProperties } from "../3d/layers/support/MediaLayerInteractionOptions.js";

export interface MediaLayerViewMixinProperties extends Partial<Pick<MediaLayerViewMixin, "interactive" | "selectedElement">> {
  /**
   * Options for when the layer view is interactive.
   *
   * > [!WARNING]
   * >
   * > Interactivity for 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) was added at version 4.31.
   *
   * @since 4.30
   * @see [interactive](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#interactive)
   */
  interactionOptions?: MediaLayerInteractionOptionsProperties;
}

export abstract class MediaLayerViewMixin {
  constructor(...args: any[]);
  /**
   * Options for when the layer view is interactive.
   *
   * > [!WARNING]
   * >
   * > Interactivity for 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) was added at version 4.31.
   *
   * @since 4.30
   * @see [interactive](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#interactive)
   */
  get interactionOptions(): MediaLayerInteractionOptions;
  set interactionOptions(value: MediaLayerInteractionOptionsProperties);
  /**
   * Enables interactivity for the [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#layer). When set to `true`, any elements in the
   * layer's [MediaLayer#source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html#source) become selectable and editable.
   *
   * > [!WARNING]
   * >
   * > Interactivity for 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) was added at version 4.31.
   *
   * @default false
   * @since 4.30
   * @see [selectedElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#selectedElement)
   * @see [interactionOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#interactionOptions)
   * @example
   * view.whenLayerView(mediaLayer).then((mediaLayerView) => {
   *   // Enable interactivity and select first element
   *   mediaLayerView.interactive = true;
   *
   *   mediaLayerView.selectedElement = mediaLayer.source.elements.at(0);
   * });
   */
  accessor interactive: boolean;
  /** The layer being viewed. */
  get layer(): MediaLayer;
  /**
   * The selected element. If [interactive](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#interactive) is `true`, any element in the
   * [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#layer) can be selected by clicking on it in the view. As long as [interactive](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#interactive)
   * remains `true`, the properties of the selected element can be edited by interacting with
   * manipulators in the view.
   *
   * > [!WARNING]
   * >
   * > Interactivity for 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) was added at version 4.31.
   *
   * @since 4.30
   * @see [interactive](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-MediaLayerViewMixin.html#interactive)
   * @example
   * view.whenLayerView(mediaLayer).then((mediaLayerView) => {
   *   // Enable interactivity and select first element
   *   mediaLayerView.interactive = true;
   *
   *   mediaLayerView.selectedElement = mediaLayer.source.elements.at(0);
   * });
   */
  accessor selectedElement: MediaElement | null | undefined;
  /**
   * Highlights the given media element(s) in a MediaLayerView. Highlights are only supported in
   * [3D SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
   *
   * @param target - The media element(s) to highlight.
   * @param options - An object with the following properties.
   * @returns Returns a highlight handler with a `remove()` method that
   * can be called to remove the highlight.
   * @see [SceneView#highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlights)
   * @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
   * @example
   * // Add a new set of highlight options to the highlights collection
   * const highlightName = "mark";
   * view.highlights.push({ name: highlightName, color: "red", fillOpacity: 0.5 });
   *
   * // Highlight a specific media element
   * view.whenLayerView(layer).then((layerView) => {
   *   let element = layer.source.elements.getItemAt(0);
   *   layerView.highlight(element, { name: highlightName } );
   * });
   */
  highlight(target: MediaElement | Iterable<MediaElement>, options?: LayerViewHighlightOptions): ResourceHandle;
}