import type Basemap from "../../../Basemap.js";
import type Accessor from "../../../core/Accessor.js";
import type Collection from "../../../core/Collection.js";
import type { BasemapsSourceState } from "../types.js";
import type { BasemapProperties } from "../../../Basemap.js";
import type { ReadonlyArrayOrCollection } from "../../../core/Collection.js";

export interface LocalBasemapsSourceProperties {
  /** A collection of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s. */
  basemaps?: ReadonlyArrayOrCollection<BasemapProperties>;
}

/**
 * The LocalBasemapsSource class is a Collection-driven [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) [BasemapGalleryViewModel#source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#source)
 * in the [BasemapGalleryViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html) or [BasemapGallery](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html) widget.
 *
 * @since 4.3
 * @see [BasemapGalleryViewModel#source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html#source)
 * @see [BasemapGallery](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html)
 * @see [BasemapGalleryViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-BasemapGalleryViewModel.html)
 * @example
 * // in this example, the portal item is a webmap
 * let basemap = new Basemap({
 *  portalItem: {
 *    id: "867895a71a1840399476fc717e76bb43" // Mid-Century Map
 *  }
 * });
 * let basemapGallery = new BasemapGallery({
 *  source: new LocalBasemapsSource({
 *    basemaps: [
 *      Basemap.fromId("topo-vector"), // create a basemap from a well known id
 *      basemap
 *    ]
 *   }),
 *  view: view
 * });
 * view.ui.add(basemapGallery, 'top-right');
 */
export default class LocalBasemapsSource extends Accessor {
  constructor(properties?: LocalBasemapsSourceProperties);
  /** A collection of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s. */
  get basemaps(): Collection<Basemap>;
  set basemaps(value: ReadonlyArrayOrCollection<BasemapProperties>);
  /** The source's state. The state is always `ready`. */
  get state(): BasemapsSourceState;
}