import type MediaInfo from "./mixins/MediaInfo.js";
import type ImageMediaInfoValue from "./support/ImageMediaInfoValue.js";
import type { MediaInfoProperties } from "./mixins/MediaInfo.js";
import type { ImageMediaInfoValueProperties } from "./support/ImageMediaInfoValue.js";

export interface ImageMediaInfoProperties extends MediaInfoProperties, Partial<Pick<ImageMediaInfo, "refreshInterval">> {
  /** Defines the value format of the image media element and how the images should be retrieved. */
  value?: ImageMediaInfoValueProperties | null;
}

/**
 * An `ImageMediaInfo` is a type of media element that represents images to display within a popup.
 *
 * ![popuptemplate-media-element-image](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup/popuptemplate-media-element-image.png)
 *
 * @since 4.11
 * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
 * @see [Content](https://developers.arcgis.com/javascript/latest/references/core/popup/content/Content/)
 * @see [ImageMediaInfoValue](https://developers.arcgis.com/javascript/latest/references/core/popup/content/support/ImageMediaInfoValue/)
 * @see [Sample - Intro to PopupTemplate](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/)
 * @see [Sample - Multiple popup elements](https://developers.arcgis.com/javascript/latest/sample-code/popup-multipleelements/)
 * @example
 * // Create the ImageMediaInfoValue
 * let imageMediaInfoValue = new ImageMediaInfoValue({
 *   sourceURL: "<insert URL>"
 * });
 *
 * // Create the ImageMediaInfo
 * let imageElement = new ImageMediaInfo({
 *   title: "<b>Mexican Fan Palm</b>",
 *   caption: "tree species",
 *   value: imageMediaInfoValue
 * });
 *
 * // Create the MediaContent
 * let mediaElement = new MediaContent({
 *   mediaInfos: [ imageElement ]
 * });
 */
export default class ImageMediaInfo extends MediaInfo {
  constructor(properties?: ImageMediaInfoProperties);
  /**
   * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh
   * at the specified interval. Value of `0` indicates auto refresh is not enabled.
   *
   * @default 0
   */
  accessor refreshInterval: number;
  /**
   * The type of popup element.
   *
   * @default "image"
   */
  get type(): "image";
  /** Defines the value format of the image media element and how the images should be retrieved. */
  get value(): ImageMediaInfoValue | null | undefined;
  set value(value: ImageMediaInfoValueProperties | null | undefined);
  /**
   * Creates a deep clone of the ImageMediaInfo class.
   *
   * @returns A deep clone of the ImageMediaInfo instance.
   */
  clone(): ImageMediaInfo;
}