import type { JSONSupport } from "../../core/JSONSupport.js";

export interface LODProperties extends Partial<Pick<LOD, "level" | "levelValue" | "resolution" | "scale">> {}

/**
 * A [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) has a number of LODs (Levels of Detail).
 * Each LOD corresponds to a map at a given scale or resolution. LOD has no constructor.
 *
 * @since 4.0
 * @see [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html)
 * @see [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html)
 */
export default class LOD extends JSONSupport {
  constructor(properties?: LODProperties);
  /**
   * ID for each level. The top most level is `0`.
   *
   * @default 0
   */
  accessor level: number;
  /**
   * String to be used when constructing a URL to access a tile from this LOD. If `levelValue` is not defined,
   * level will be used for the tile access URL. This property is useful when an LOD object represents a
   * WMTS TileMatrix with non-numeric matrix identifiers.
   */
  accessor levelValue: string | null | undefined;
  /**
   * Resolution in map units of each pixel in a tile for each level.
   *
   * @default 0
   */
  accessor resolution: number;
  /**
   * Scale for each level.
   *
   * @default 0
   */
  accessor scale: number;
}