import type Accessor from "../core/Accessor.js";
import type Collection from "../core/Collection.js";
import type LayerView from "./layers/LayerView.js";
import type { MapViewOrSceneView } from "./MapViewOrSceneView.js";

export interface BasemapViewProperties<TLayerView extends LayerView = LayerView> {
  /** References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). */
  view?: MapViewOrSceneView | null;
}

/**
 * Represents the view for a single basemap after it has been added to either a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
 *
 * @since 4.13
 * @see [MapView#basemapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#basemapView)
 * @see [SceneView#basemapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#basemapView)
 */
export default class BasemapView<TLayerView extends LayerView = LayerView> extends Accessor {
  constructor(properties?: BasemapViewProperties<TLayerView>);
  /**
   * A collection containing a hierarchical list of all the created
   * [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the
   * base layers in the map.
   */
  get baseLayerViews(): Collection<TLayerView>;
  /**
   * A collection containing a hierarchical list of all the created
   * [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the
   * reference layers in the map. The reference layers will be displayed on top of all layers in the map.
   */
  get referenceLayerViews(): Collection<TLayerView>;
  /**
   * Value is `true` when the basemap is updating; for example, if
   * it is in the process of fetching data.
   *
   * @default false
   */
  get updating(): boolean;
  /** References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). */
  get view(): MapViewOrSceneView | null | undefined;
}