import type Collection from "../../core/Collection.js";
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
import type { EventedAccessor } from "../../core/Evented.js";
import type { LoadableMixin, LoadableMixinProperties } from "../../core/Loadable.js";
import type { EsriPromiseMixin } from "../../core/Promise.js";
import type { MediaElement } from "../media/types.js";
import type { ImageElementProperties } from "./ImageElement.js";
import type { VideoElementProperties } from "./VideoElement.js";

export interface LocalMediaElementSourceProperties extends LoadableMixinProperties {
  /**
   * [Image](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html) and [video](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html)
   * elements referenced in the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html). Image and video elements can be added or removed from [elements](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LocalMediaElementSource.html#elements) collection at runtime.
   *
   * @example
   * // add a new imageElement to the media layer at runtime
   * const imageElement = new ImageElement({
   *   image: "https://arcgis.github.io/arcgis-samples-javascript/sample-data/media-layer/neworleans1891.png",
   *   georeference: new ExtentAndRotationGeoreference({
   *     extent: new Extent({
   *       spatialReference: {
   *          wkid: 102100
   *       },
   *       xmin: -10047456.27662979,
   *       ymin: 3486722.2723874687,
   *       xmax: -10006982.870152846,
   *       ymax: 3514468.91365495
   *     })
   *   })
   * });
   * layer.source.elements.add(imageElement);
   * @example
   * // remove image element from the media layer at runtime
   * layer.source.elements.remove(selectedImageElement);
   */
  elements?: ReadonlyArrayOrCollection<(ImageElementProperties & { type: "image"; }) | (VideoElementProperties & { type: "video"; })>;
}

/**
 * The LocalMediaElementSource is the default [MediaLayer.source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html#source) for the MediaLayer.
 * It contains a collection of [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html) and [video](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html)
 * elements referenced in the [MediaLayer's source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html#source). Image and video elements can be added or removed from [elements](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LocalMediaElementSource.html#elements) collection at runtime.
 *
 * @since 4.24
 * @see [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html)
 * @see [Sample - MediaLayer with images](https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-images/)
 * @see [Sample - MediaLayer with video](https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-video/)
 */
export default class LocalMediaElementSource extends LocalMediaElementSourceSuperclass {
  constructor(properties?: LocalMediaElementSourceProperties);
  /**
   * [Image](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html) and [video](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html)
   * elements referenced in the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html). Image and video elements can be added or removed from [elements](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LocalMediaElementSource.html#elements) collection at runtime.
   *
   * @example
   * // add a new imageElement to the media layer at runtime
   * const imageElement = new ImageElement({
   *   image: "https://arcgis.github.io/arcgis-samples-javascript/sample-data/media-layer/neworleans1891.png",
   *   georeference: new ExtentAndRotationGeoreference({
   *     extent: new Extent({
   *       spatialReference: {
   *          wkid: 102100
   *       },
   *       xmin: -10047456.27662979,
   *       ymin: 3486722.2723874687,
   *       xmax: -10006982.870152846,
   *       ymax: 3514468.91365495
   *     })
   *   })
   * });
   * layer.source.elements.add(imageElement);
   * @example
   * // remove image element from the media layer at runtime
   * layer.source.elements.remove(selectedImageElement);
   */
  get elements(): Collection<MediaElement>;
  set elements(value: ReadonlyArrayOrCollection<(ImageElementProperties & { type: "image"; }) | (VideoElementProperties & { type: "video"; })>);
}
declare const LocalMediaElementSourceSuperclass: typeof EventedAccessor & typeof EsriPromiseMixin & typeof LoadableMixin