import type Extent from "../geometry/Extent.js";
import type WebTileLayer from "./WebTileLayer.js";
import type { WebTileLayerProperties } from "./WebTileLayer.js";

export interface OpenStreetMapLayerProperties extends WebTileLayerProperties {}

/**
 * Allows you to use [basemaps](https://wiki.openstreetmap.org/wiki/List_of_OSM-based_services) from [OpenStreetMap](https://www.openstreetmap.org/).
 * Set the [tileServers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html#tileServers) property to change which OpenStreetMap tiles you want to use.
 *
 * @since 4.0
 * @see [Sample - OpenStreetMapLayer (3D)](https://developers.arcgis.com/javascript/latest/sample-code/layers-osm-3d/)
 * @see [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html)
 * @see [WebTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html)
 */
export default class OpenStreetMapLayer extends WebTileLayer {
  constructor(properties?: OpenStreetMapLayerProperties);
  /**
   * The full extent of the layer. By default, this is worldwide. This property may be used
   * to set the extent of the view to match a layer's extent so that its features
   * appear to fill the view. See the sample snippet below.
   *
   * @example
   * // Once the layer loads, set the view's extent to the layer's fullextent
   * layer.when(function(){
   *   view.extent = layer.fullExtent;
   * });
   * @example
   * // Once the layer loads, set the view's extent to the layer's fullextent
   * layer.when(function(){
   *   view.extent = layer.fullExtent;
   * });
   */
  get fullExtent(): Extent;
  /**
   * The subdomains used to access the tile service.
   *
   * @default ["a", "b", "c"]
   * @example console.log(layer.subDomains); // ["a", "b", "c"]
   * @see [WebTileLayer#urlTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html#urlTemplate)
   * @example
   * // add an open street map layer
   * new WebTileLayer({
   *   "https://{subDomain}.tile.openstreetmap.org/{z}/{x}/{y}.png",
   *   subDomains: ["a", "b", "c"],
   * });
   */
  get subDomains(): [
      "a",
      "b",
      "c"
  ];
  /** For [WebTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html) the type is `web-tile`. */
  get type(): "open-street-map";
  /**
   * The URL template used to access the tile service.
   *
   * @default "https://{subDomain}.tile.openstreetmap.org/{level}/{col}/{row}.png"
   * @example console.log(layer.urlTemplate); // "https://{subDomain}.tile.openstreetmap.org/{level}/{col}/{row}.png"
   * @see [WebTileLayer#subDomains](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html#subDomains)
   * @example
   * // add an open street map layer
   * new WebTileLayer({
   *   "https://{subDomain}.tile.openstreetmap.org/{z}/{x}/{y}.png",
   *   subDomains: ["a", "b", "c"],
   * });
   */
  get urlTemplate(): "https://{subDomain}.tile.openstreetmap.org/{level}/{col}/{row}.png";
}