import type Extent from "../geometry/Extent.js";
import type SpatialReference from "../geometry/SpatialReference.js";
import type Layer from "./Layer.js";
import type SpriteSource from "./support/SpriteSource.js";
import type TileInfo from "./support/TileInfo.js";
import type PortalItem from "../portal/PortalItem.js";
import type { MultiOriginJSONMixin, MultiOriginJSONMixinProperties } from "../core/MultiOriginJSONSupport.js";
import type { AbortOptions } from "../core/promiseUtils.js";
import type { VectorTileLayerCapabilities } from "./types.js";
import type { APIKeyMixin, APIKeyMixinProperties } from "./mixins/APIKeyMixin.js";
import type { ArcGISCachedService, ArcGISCachedServiceProperties } from "./mixins/ArcGISCachedService.js";
import type { ArcGISService, ArcGISServiceProperties } from "./mixins/ArcGISService.js";
import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
import type { CustomParametersMixin, CustomParametersMixinProperties } from "./mixins/CustomParametersMixin.js";
import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js";
import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
import type { RefreshableLayer, RefreshableLayerEvents, RefreshableLayerProperties } from "./mixins/RefreshableLayer.js";
import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
import type { SpriteSourceInfo } from "./support/types.js";
import type { PortalItemProperties } from "../portal/PortalItem.js";
import type { LayerProperties } from "./Layer.js";

export interface VectorTileLayerProperties extends LayerProperties, MultiOriginJSONMixinProperties, APIKeyMixinProperties, CustomParametersMixinProperties, PortalLayerProperties, OperationalLayerProperties, ArcGISServiceProperties, ArcGISCachedServiceProperties, RefreshableLayerProperties, ScaleRangeLayerProperties, BlendLayerProperties, Partial<Pick<VectorTileLayer, "style" | "url">> {
  /**
   * An authorization string used to access a resource or service.
   * [API keys](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/) are generated and managed in the portal.
   * An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage.
   * Setting a fine-grained API key on a specific class overrides the [global API key](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#ConfigWithApiKey).
   *
   * @since 4.22
   * @example
   * // set the api key to access a protected service
   * const layer = new VectorTileLayer({
   *   url: serviceUrl,
   *   apiKey: "YOUR_API_KEY"
   * });
   * @see [Item access privileges](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/api-key-credentials/#item-access-privileges)
   * @see [API key guide](https://developers.arcgis.com/javascript/latest/secure-resources/#api-keys)
   * @example
   * // set the api key to access a protected service
   * const layer = new FeatureLayer({
   *   url: serviceUrl,
   *   apiKey: "YOUR_API_KEY"
   * });
   */
  apiKey?: string | null;
  /**
   * The portal item from which the layer is loaded. This will load the layer
   * from the portal item, not the vector tile service.
   *
   * @example
   * let layer = new VectorTileLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "4cf7e1fb9f254dcda9c8fbadb15cf0f8"
   *   }
   * });
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "caa9bd9da1f4487cb4989824053bb847"
   *   }  // the first layer in the service is returned
   * });
   * @example
   * // Set hostname when using an on-premise portal (default is ArcGIS Online)
   * // esriConfig.portalUrl = "http://myHostName.esri.com/arcgis";
   *
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for SceneLayers.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "8d26f04f31f642b6828b7023b84c2188"
   *   },
   *   // loads the third item in the given feature service
   *   layerId: 2
   * });
   * @example
   * // Initialize GeoJSONLayer by referencing a portalItem id pointing to geojson file.
   * const layer = new GeoJSONLayer({
   *   portalItem: new PortalItem({
   *     id: "81e769cd7031482797e1b0768f23c7e1",
   *     // optionally define the portal, of the item.
   *     // if not specified, the default portal defined is used.
   *     // see https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl
   *     portal: new Portal({
   *       url: "https://jsapi.maps.arcgis.com/"
   *     })
   *   }
   * });
   * @example
   * // This snippet loads a table hosted in ArcGIS Online.
   * const table = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "123f4410054b43d7a0bacc1533ceb8dc"
   *   }
   * });
   *
   * // Before adding the table to the map, it must first be loaded and confirm it is the right type.
   * table.load().then(() => {
   *   if (table.isTable) {
   *     map.tables.add(table);
   *   }
   * });
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "caa9bd9da1f4487cb4989824053bb847",
   *     // Set an API key to access a secure portal item configured with API key authentication.
   *     apiKey: "APIKEY"
   *   }
   * });
   */
  portalItem?: PortalItemProperties | null;
  /**
   * Refresh interval of the layer in minutes. Value of `0` indicates no refresh.
   * Clears the layer's cache and requests new data from the server at the specified interval.
   *
   * @default 0
   * @since 4.31
   * @see [refresh()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#refresh)
   * @see [refresh event](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#event-refresh)
   * @example
   * // the layer will be refreshed every 15 minutes.
   * layer.refreshInterval = 15;
   * @see [RefreshableLayer#refresh()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refresh)
   * @see [refresh event](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#event-refresh)
   * @example
   * // the layer will be refreshed every minute.
   * layer.refreshInterval = 1;
   */
  refreshInterval?: number;
  /**
   * The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget.
   *
   * When loading a layer by service url, the title is derived from the service name.
   * If the service has several layers, then the title of each layer will be the concatenation of the service name
   * and the layer name.
   * When the layer is loaded from a portal item, the title of the portal item will be used instead.
   * Finally, if a layer is loaded as part of a webmap or a webscene, then the title of the layer as stored in the webmap/webscene will be used.
   */
  title?: string | null;
}

export interface VectorTileLayerEvents extends RefreshableLayerEvents {}

/**
 * * [Overview](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#overview)
 * * [Creating a VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#creating-a-vectortilelayer)
 * * [Updating VectorTileLayer style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#changing-a-style)
 *
 * <span id="overview"></span>
 * ## Overview
 *
 * VectorTileLayer accesses cached tiles of data and renders it in vector format. It is similar
 * to a [WebTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html) in the context of caching; however, a [WebTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html)
 * renders as a series of images, not vector data. Unlike raster tiles, vector tiles can adapt to the resolution of their display device
 * and can be restyled for multiple uses. VectorTileLayer delivers styled maps while taking advantage of cached raster map tiles
 * with vector map data.
 *
 * How the VectorTileLayer displays is defined by the [MapLibre style specification](https://maplibre.org/maplibre-style-spec/).
 * VectorTileLayer [style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo) information is stored separately from its tiles. This means that one set of vector tiles may be styled in numerous
 * ways without having to generate a new image cache for each style. This helps save space and speeds up the process of creating new map styles.
 *
 * The [ArcGIS Vector Tile Style Editor](https://developers.arcgis.com/vector-tile-style-editor/) is used to
 * design custom vector basemaps. Please refer to [Design custom basemaps with the new ArcGIS Vector Tile Style Editor](https://www.esri.com/arcgis-blog/products/developers/mapping/design-custom-basemaps-with-the-new-arcgis-vector-tile-style-editor/)
 * to learn more about designing custom vector basemaps using the ArcGIS Vector Tile Style Editor.
 *
 * If the vector tile service is requested from a different domain, either a [CORS enabled server](https://developers.arcgis.com/javascript/latest/cors/) or a [proxy](https://developers.arcgis.com/javascript/latest/proxies/) is
 * required.
 *
 * <span id="creating-a-vectortilelayer"></span>
 * ## Creating a VectorTileLayer
 *
 * A VectorTileLayer can be created in one of the following ways:
 * - By setting the [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#url) property to one of the supported URL types.
 * - By setting the [portalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#portalItem) property with an ArcGIS portal item ID.
 * - By setting the [style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#style) property with a JSON style object.
 *
 * Once the layer is created, add it to a map using the [Map#add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#add) method to display it in a map.
 *
 * <details>
 * <summary>Read More</summary>
 *
 * ### Using a URL (service, style, or TileJSON)
 *
 * To create a VectorTileLayer from a URL, set the layer’s [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#url) property to one of the following:
 * * The [REST endpoint of a [vector tile service](https://developers.arcgis.com/rest/services-reference/enterprise/vector-tile-service/)
 * * A vector tile [style](https://developers.arcgis.com/rest/services-reference/enterprise/vector-tile-style/) URL
 * * A [TileJSON](https://github.com/mapbox/tilejson-spec/tree/master/3.0.0) endpoint (added at version 4.34)
 *
 * ```js
 * // Example 1: Create a VectorTileLayer from vector tile service URL by setting the layer's url property
 * const VectorTileLayer = await $arcgis.import("@arcgis/core/layers/VectorTileLayer.js");
 * const layer = new VectorTileLayer({
 *   // esri world vector tile service
 *   url: "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer"
 * });
 * map.add(layer);
 * ```
 *
 * ```js
 * // Example 2: Create a VectorTileLayer from the vector tile style endpoint by setting the layer's url property
 * const layer = new VectorTileLayer({
 *   // esri colored pencil style
 *   url:
 *    "https://www.arcgis.com/sharing/rest/content/items/4cf7e1fb9f254dcda9c8fbadb15cf0f8/resources/styles/root.json"
 * });
 * map.add(layer);
 * ```
 *
 * ```js
 * // Example 3: Create a VectorTileLayer from a TileJSON source
 * const layer = new VectorTileLayer({
 *   url: "https://your-tile-json-url?f=tilejson"
 * });
 * map.add(layer);
 * ```
 *
 * Since the TileJSON source does not include style information, the layer will be rendered using a default style.
 * For the layer to load and render correctly, the TileJSON must meet the following requirements:
 * - The TileJSON must include a vector source.
 * - The TileJSON tiles must be in the Web Mercator spatial reference (WKID: 3857).
 * - The `vector_layers` array must contain at least one layer.
 * - Each layer in the `vector_layers` array should specify the `geometry_type` to ensure proper rendering. The `geometry_type` can be one of the following: `point`, `polygon`, or `line`.
 * - Vector tiles must be 512 by 512 pixels in size and overlap the data sufficiently to allow features to draw correctly.
 *
 * ### Reference an ArcGIS portal item ID
 *
 * You can also create a VectorTileLayer from its portal item ID if it exists as an item in ArcGIS Online or ArcGIS Enterprise.
 * For example, the following snippet shows how to add a new VectorTileLayer instance to a map using the [portalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#portalItem) property.
 *
 * ```js
 * // points to the charted territory vector tile portal item in ArcGIS Online
 * // https://www.arcgis.com/home/item.html?id=1c365daf37a744fbad748b67aa69dac8
 * let layer = new VectorTileLayer({
 *  portalItem:{
 *    id: "1c365daf37a744fbad748b67aa69dac8"
 *  }
 * });
 * map.add(layer);  // adds the layer to the map
 * ```
 *
 * ### Reference a style JSON object
 * To create a VectorTileLayer instance from a style JSON object, set the [style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#style) property of the layer to point to the style JSON object.
 * Check out the [VectorTileLayer from JSON](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-json/) sample to see this in action.
 *
 * ```js
 * // create a new instance of VectorTileLayer from style JSON object
 * // by setting the layer's style property
 * const layer = new VectorTileLayer({
 *   style: {
 *     glyphs: "glyphsUrl/{fontstack}/{range}.pbf",
 *     version: 8,
 *     sprite: "spritesUrl/sprites/sprite",
 *     sources: {
 *       esri: {
 *         url: "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer",
 *         type: "vector"
 *       }
 *     },
 *     layers: [ ... ]
 *   }
 * });
 * map.add(layer);  // adds the layer to the map
 * ```
 *
 * </details>
 *
 * <span id="changing-a-style"></span>
 * ## Updating VectorTileLayer style
 *
 * To update the style of a VectorTileLayer you can replace the entire style by calling the layer's
 * [loadStyle()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#loadStyle) method. If you want to modify a style property you can use [setLayoutProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setLayoutProperties)
 * or [setPaintProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setPaintProperties) methods.
 *
 * <details>
 * <summary>Read More</summary>
 *
 * ### Replacing an entire style
 * The VectorTileLayer's [style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#style) can be replaced in its entirety after the layer is initialized and added to the map.
 * This can be done by calling the layer's [loadStyle()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#loadStyle) method. This method will load a style from a style JSON object
 * or from the style url, and will replace the current style of the layer. This operation will reload the entire layer.
 *
 * ```js
 * // add a mid-century vector tile layer from its portal item
 * let layer = new VectorTileLayer({
 *  portalItem:{
 *    id: "7675d44bb1e4428aa2c30a9b68f97822"
 *  }
 * });
 * map.add(layer);  // adds the layer to the map
 *
 * // replace the style of this layer to point to modern antique style
 * layer.loadStyle(
 *   "https://www.arcgis.com/sharing/rest/content/items/effe3475f05a4d608e66fd6eeb2113c0/resources/styles/root.json"
 * );
 * ```
 * ![vectortiles-loadstyle](https://developers.arcgis.com/javascript/latest/assets/img/apiref/layers/layers-vectortiles-loadstyle.gif)
 *
 * ### Updating various properties of style layers
 * Properties of [style layers](https://maplibre.org/maplibre-style-spec/layers/) in the VectorTileLayer's [current style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo) can be changed
 * after the VectorTileLayer is initialized. The VectorTileLayer offers a number of helper methods that will allow you to update properties of a style layer
 * without having to reload the layer. This can be done only in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
 *
 * At version 4.10, we introduced [getLayoutProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#getLayoutProperties), [getPaintProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#getPaintProperties),
 * [setLayoutProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setLayoutProperties) and [setPaintProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setPaintProperties).
 * These methods give direct access to the [paint](https://maplibre.org/maplibre-style-spec/layers/#paint-property)
 * and [layout](https://maplibre.org/maplibre-style-spec/layers/#layout-property) properties of a style layer.
 * Check out the [VectorTileLayer from JSON](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-json/) sample to see this in action.
 *
 * ```js
 * // get layout properties of "Admin0 point/large" style layer
 * const layoutProperties = vtLayer.getLayoutProperties("Admin0 point/large");
 *
 * // change the text-transform layout property to upper case
 * layoutProperties["text-transform"] = "uppercase";
 * layer.setLayoutProperties("Admin0 point/large", layoutProperties);
 *
 * // get the paint properties for the marine area/1 layer
 * const paintProperties = vtLayer.getPaintProperties("Marine area");
 *
 * // change the fill-color paint property for the layer.
 * paintProperties["fill-color"] = "#93cfc7";
 * layer.setPaintProperties("Marine area/1", paintProperties);
 * ```
 * At version 4.18, we added the following helper methods: [getStyleLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#getStyleLayer), [setStyleLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setStyleLayer),
 * [deleteStyleLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#deleteStyleLayer), [getStyleLayerVisibility()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#getStyleLayerVisibility), and [setStyleLayerVisibility()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setStyleLayerVisibility).
 * The [setStyleLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setStyleLayer) method  will allow you to add a new style layer or re-order style layers.
 * It also allows you to rewrite or change any of the properties of a [style layer](https://maplibre.org/maplibre-style-spec/layers)
 * including `filter`, `source-layer`, `layout` and `paint`.
 * The [deleteStyleLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#deleteStyleLayer) method deletes the specified style layer from the style and
 * the [setStyleLayerVisibility()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setStyleLayerVisibility) method toggles the visibility of a style layer.
 * Check out the [VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/) sample to see this in action.
 *
 * ```js
 * // change paint and layout properties of a style layer
 * const styleLayer = layer.getStyleLayer("City small scale/x large admin0 capital");
 * styleLayer.paint["text-color"] = "#e400e0";
 * styleLayer.paint["text-halo-color"] = "#e400e0";
 * styleLayer.layout["icon-size"] = 1.5;
 *
 * // delete a style layer from the current style
 * layer.deleteStyleLayer("Marine areas");
 *
 * // add a new style layer on top of the existing style
 * const styleLayer = { style layer json object}
 * layer.setStyleLayer(styleLayer, 0)
 * ```
 * [![vectortiles-setstylelayer](https://developers.arcgis.com/javascript/latest/assets/img/apiref/layers/layers-vectortiles-setstylelayer.gif)](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
 *
 * </details>
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) printing requires ArcGIS Server 10.5.1 or later.
 * > For printing secure VectorTileLayers with ArcGIS Server 10.5.1 or 10.6.0, the [print](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-print.html) will create a client-side image for the VectorTileLayer to use in the printout.
 * > This has some limitations related to large size printing quality and a dependency on browser window height/width ratio.
 * > Sizes of patterns used for the [background](https://maplibre.org/maplibre-style-spec/layers/#paint-background-background-pattern) and
 * > [fill](https://maplibre.org/maplibre-style-spec/layers/#paint-fill-fill-pattern) style layers in the VectorTileLayer style should be a power of two to ensure the best results.
 *
 * @since 4.0
 * @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)
 * @see [Sample - Vector tiles](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer/)
 * @see [Sample - VectorTileLayer from JSON](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-json/)
 * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
 */
export default class VectorTileLayer extends VectorTileLayerSuperclass {
  /**
   * @deprecated
   * Do not directly reference this property.
   * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
   */
  "@eventTypes": VectorTileLayerEvents;
  /**
   * @example
   * // Typical usage
   * const vtlLayer = new VectorTileLayer({
   *   // URL to the style of vector tiles
   *   url: "https://www.arcgis.com/sharing/rest/content/items/4cf7e1fb9f254dcda9c8fbadb15cf0f8/resources/styles/root.json"
   * });
   *
   * const vtlLayer = new VectorTileLayer({
   *   // URL to the vector tile service
   *   url: "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer"
   * });
   *
   * // points to the charted territory vector tile portal item in ArcGIS Online
   * // https://www.arcgis.com/home/item.html?id=1c365daf37a744fbad748b67aa69dac8
   * const layer = new VectorTileLayer({
   *  portalItem:{
   *    id: "1c365daf37a744fbad748b67aa69dac8"
   *  }
   * });
   *
   * const vtlLayer = new VectorTileLayer({
   *   // from style object
   *   style: {
   *     "version": 8,
   *     "sources": {
   *       "esri": {
   *         "type": "vector",
   *         "url": "https://VectorTileServiceURL"
   *       }
   *     },
   *     "layers": [
   *     ...
   *     ]
   *   }
   * });
   */
  constructor(properties?: VectorTileLayerProperties);
  /**
   * An authorization string used to access a resource or service.
   * [API keys](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/) are generated and managed in the portal.
   * An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage.
   * Setting a fine-grained API key on a specific class overrides the [global API key](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#ConfigWithApiKey).
   *
   * @since 4.22
   * @example
   * // set the api key to access a protected service
   * const layer = new VectorTileLayer({
   *   url: serviceUrl,
   *   apiKey: "YOUR_API_KEY"
   * });
   * @see [Item access privileges](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/api-key-credentials/#item-access-privileges)
   * @see [API key guide](https://developers.arcgis.com/javascript/latest/secure-resources/#api-keys)
   * @example
   * // set the api key to access a protected service
   * const layer = new FeatureLayer({
   *   url: serviceUrl,
   *   apiKey: "YOUR_API_KEY"
   * });
   */
  accessor apiKey: string | null | undefined;
  /** The URL that points to the location of the layer's attribution data. */
  get attributionDataUrl(): string | null;
  /**
   * Indicates the layer's supported capabilities.
   *
   * @since 4.8
   */
  get capabilities(): VectorTileLayerCapabilities;
  /** The current style information of the VectorTileLayer. See the object specification below. */
  get currentStyleInfo(): VectorTileLayerCurrentStyleInfo;
  /**
   * The initial extent of the layer. The initialExtent is derived from:
   * * ArcGIS vector tile service's [metadata](https://developers.arcgis.com/rest/services-reference/enterprise/vector-tile-service.htm).
   * * The `bounds` parameter when the [source](https://maplibre.org/maplibre-style-spec/sources/) of the layer's style references a
   * [TileJSON](https://github.com/mapbox/tilejson-spec) resource. Bounds are represented in WGS84.
   * * If the above parameters are not present, the initialExtent is set to global level.
   *
   * @since 4.28
   * @example
   * // zoom to vector tile layer's initial extent
   * await view.whenLayerView(layer);
   * if (layer.initialExtent) {
   *   view.goTo(layer.initialExtent);
   * }
   */
  get initialExtent(): Extent | null | undefined;
  /**
   * The portal item from which the layer is loaded. This will load the layer
   * from the portal item, not the vector tile service.
   *
   * @example
   * let layer = new VectorTileLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "4cf7e1fb9f254dcda9c8fbadb15cf0f8"
   *   }
   * });
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "caa9bd9da1f4487cb4989824053bb847"
   *   }  // the first layer in the service is returned
   * });
   * @example
   * // Set hostname when using an on-premise portal (default is ArcGIS Online)
   * // esriConfig.portalUrl = "http://myHostName.esri.com/arcgis";
   *
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for SceneLayers.
   * const layer = new FeatureLayer({
   *   portalItem: {  // autocasts as new PortalItem()
   *     id: "8d26f04f31f642b6828b7023b84c2188"
   *   },
   *   // loads the third item in the given feature service
   *   layerId: 2
   * });
   * @example
   * // Initialize GeoJSONLayer by referencing a portalItem id pointing to geojson file.
   * const layer = new GeoJSONLayer({
   *   portalItem: new PortalItem({
   *     id: "81e769cd7031482797e1b0768f23c7e1",
   *     // optionally define the portal, of the item.
   *     // if not specified, the default portal defined is used.
   *     // see https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl
   *     portal: new Portal({
   *       url: "https://jsapi.maps.arcgis.com/"
   *     })
   *   }
   * });
   * @example
   * // This snippet loads a table hosted in ArcGIS Online.
   * const table = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "123f4410054b43d7a0bacc1533ceb8dc"
   *   }
   * });
   *
   * // Before adding the table to the map, it must first be loaded and confirm it is the right type.
   * table.load().then(() => {
   *   if (table.isTable) {
   *     map.tables.add(table);
   *   }
   * });
   * @example
   * // While this example uses FeatureLayer, this same pattern can be
   * // used for other layers that may be loaded from portalItem ids.
   * const layer = new FeatureLayer({
   *   portalItem: { // autocasts as esri/portal/PortalItem
   *     id: "caa9bd9da1f4487cb4989824053bb847",
   *     // Set an API key to access a secure portal item configured with API key authentication.
   *     apiKey: "APIKEY"
   *   }
   * });
   */
  get portalItem(): PortalItem | null | undefined;
  set portalItem(value: PortalItemProperties | null | undefined);
  /**
   * Refresh interval of the layer in minutes. Value of `0` indicates no refresh.
   * Clears the layer's cache and requests new data from the server at the specified interval.
   *
   * @default 0
   * @since 4.31
   * @see [refresh()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#refresh)
   * @see [refresh event](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#event-refresh)
   * @example
   * // the layer will be refreshed every 15 minutes.
   * layer.refreshInterval = 15;
   * @see [RefreshableLayer#refresh()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refresh)
   * @see [refresh event](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#event-refresh)
   * @example
   * // the layer will be refreshed every minute.
   * layer.refreshInterval = 1;
   */
  accessor refreshInterval: number;
  /** The spatial reference of the layer. */
  get spatialReference(): SpatialReference;
  /**
   * A style JSON object of vector tiles that will be used to render the layer.
   * If initializing the layer with a style JSON object, the tiles are fetched
   * from the tile servers specified in the style object.
   *
   * @since 4.6
   * @example
   * let vtlLayer = new VectorTileLayer({
   *   // from style object
   *   style: {
   *     "version": 8,
   *     "sources": {
   *       "esri": {
   *         "type": "vector",
   *         "url": "https://VectorTileServiceURL"
   *       }
   *     },
   *     "layers": [
   *     ...
   *     ]
   *   }
   * });
   */
  accessor style: any;
  /** The tiling scheme information for the layer. */
  get tileInfo(): TileInfo;
  /**
   * The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget.
   *
   * When loading a layer by service url, the title is derived from the service name.
   * If the service has several layers, then the title of each layer will be the concatenation of the service name
   * and the layer name.
   * When the layer is loaded from a portal item, the title of the portal item will be used instead.
   * Finally, if a layer is loaded as part of a webmap or a webscene, then the title of the layer as stored in the webmap/webscene will be used.
   */
  accessor title: string | null | undefined;
  /**
   * The layer type provides a convenient way to check the type of the layer
   * without the need to import specific layer modules.
   */
  get type(): "vector-tile";
  /**
   * The URL to the [vector tile service](https://developers.arcgis.com/rest/services-reference/enterprise/vector-tile-service/),
   * the URL to the [style resource](https://developers.arcgis.com/rest/services-reference/enterprise/vector-tile-style/) of vector tiles,
   * or the URL to a [TileJSON](https://github.com/mapbox/tilejson-spec) resource that will be used to render the layer.
   *
   * If specifying a URL to a style, the tiles are fetched from the `sources` specified in the style object.
   * If specifying a TileJSON URL, the tiles and related metadata such as bounds and attribution are read from the TileJSON configuration. This support was added in version 4.34.
   * Since the TileJSON source does not include style information, the layer will be rendered using a default style.
   * For the layer to load and render correctly, the TileJSON must meet the following requirements:
   * - The TileJSON must include a vector source.
   * - The TileJSON tiles must be in the Web Mercator spatial reference (WKID: 3857).
   * - The `vector_layers` array must contain at least one layer.
   * - Each layer in the `vector_layers` array should specify the `geometry_type` to ensure proper rendering. The `geometry_type` can be one of the following: `point`, `polygon`, or `line`.
   * - Vector tiles must be 512 by 512 pixels in size and overlap the data sufficiently to allow features to draw correctly.
   *
   * @example
   * // Example 1: Create a VectorTileLayer from vector tile service URL by setting the layer's url property
   * const VectorTileLayer = await $arcgis.import("@arcgis/core/layers/VectorTileLayer.js");
   * const layer = new VectorTileLayer({
   *   // esri world vector tile service
   *   url: "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer"
   * });
   * map.add(layer);
   * @example
   * // Example 2: Create a VectorTileLayer from the vector tile style endpoint by setting the layer's url property
   * const layer = new VectorTileLayer({
   *   // esri colored pencil style
   *   url:
   *    "https://www.arcgis.com/sharing/rest/content/items/4cf7e1fb9f254dcda9c8fbadb15cf0f8/resources/styles/root.json"
   * });
   * map.add(layer);
   * @example
   * // Example 3: Create a VectorTileLayer from a TileJSON source
   * const layer = new VectorTileLayer({
   *   url: "https://your-tile-json-url?f=tilejson"
   * });
   * map.add(layer);
   */
  accessor url: string | null | undefined;
  /**
   * Deletes the specified [style layer](https://maplibre.org/maplibre-style-spec/layers/) from the
   * VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This method is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * as specified in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @since 4.18
   * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
   * @example
   * // remove the specified style layer from the style.
   * layer.deleteStyleLayer("landcover/grassland");
   */
  deleteStyleLayer(layerId: string): void;
  /**
   * Returns an instance of [layout](https://maplibre.org/maplibre-style-spec/layers/#layout-property)
   * properties for the specified [style layer](https://maplibre.org/maplibre-style-spec/layers/).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @returns [Layout](https://maplibre.org/maplibre-style-spec/layers/#layout-property) JSON object for the specified style layer.
   * @since 4.10
   */
  getLayoutProperties(layerId: string): any;
  /**
   * Returns an instance of [paint](https://maplibre.org/maplibre-style-spec/layers/#paint) properties for the specified
   * [style layer](https://maplibre.org/maplibre-style-spec/layers/).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @returns [Paint](https://maplibre.org/maplibre-style-spec/layers/#paint) JSON object of the style layer.
   * @since 4.10
   */
  getPaintProperties(layerId: string): any;
  /**
   * Returns an instance of a [style layer](https://maplibre.org/maplibre-style-spec/layers)
   * from the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * specified in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @returns The json object representing the [style Layer](https://maplibre.org/maplibre-style-spec/layers).
   * @since 4.18
   * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
   */
  getStyleLayer(layerId: string): any;
  /**
   * Returns the layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * of the [style layer](https://maplibre.org/maplibre-style-spec/layers)
   * based on its index.
   *
   * @param index - Index of the style layer in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @returns The style layer id.
   * @since 4.10
   */
  getStyleLayerId(index: number): string | null | undefined;
  /**
   * Returns the index of the [style layer](https://maplibre.org/maplibre-style-spec/layers) from the VectorTileLayer's
   * [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   *
   * @param layerId - The [style layer id](https://maplibre.org/maplibre-style-spec/layers/#id) as specified
   * in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @returns The style layer index.
   * @since 4.18
   * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
   */
  getStyleLayerIndex(layerId: string): number;
  /**
   * Gets the visibility of the specified [style layer](https://maplibre.org/maplibre-style-spec/layers/) from the
   * VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * as specified in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @returns Visibility of style layer. Returns either `"none"` or `"visible"`.
   * @since 4.18
   * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
   * @example
   * // Get the visibility of the grassland style layer in the style.
   * const layerVisibility = layer.getStyleLayerVisibility("landcover/grassland");
   */
  getStyleLayerVisibility(layerId: string): "none" | "visible";
  /**
   * Loads a style to render a layer from the specified URL to a style resource or style JSON object. It is
   * equivalent of changing the entire CSS style sheet for web page. When loading a style, it is the developer's
   * responsibility to make sure that any relative urls in the style resolve correctly.
   *
   * @param style - The URL to a style of vector tiles or style JSON object.
   * @param options - An object with the following properties.
   * @returns Returns a promise that resolves when the style is loaded and applied to the layer.
   */
  loadStyle(style?: string | Object | null, options?: AbortOptions | null | undefined): Promise<void>;
  /**
   * Fetches all the data for the layer. This method does not fetch the layer's style. User must call [loadStyle()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#loadStyle) to fetch the style.
   *
   * @since 4.31
   * @see [refreshInterval](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#refreshInterval)
   * @see [refresh event](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#event-refresh)
   * @see [RefreshableLayer#refreshInterval](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval)
   * @see [refresh event](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#event-refresh)
   */
  refresh(): void;
  /**
   * Updates the [layout](https://maplibre.org/maplibre-style-spec/layers/#layout-property) properties to the specified
   * [style layer](https://maplibre.org/maplibre-style-spec/layers/).
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This method is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @param layout - An instance of layout properties to assign to the style layer.
   * @since 4.10
   * @example
   * // get the layout properties for the "Admin0 point/large" layer
   * const layoutProperties = vtLayer.getLayoutProperties("Admin0 point/large");
   *
   * // change the text-transform layout property for the layer
   * layoutProperties["text-transform"] = "uppercase";
   * vtLayer.setLayoutProperties("Admin0 point/large", layoutProperties);
   */
  setLayoutProperties(layerId: string, layout: any): void;
  /**
   * Updates the [paint](https://maplibre.org/maplibre-style-spec/layers/#paint) properties to the specified
   * [style layer](https://maplibre.org/maplibre-style-spec/layers).
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This method is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @param painter - An instance of paint properties to assign to the specified style layer.
   * @since 4.10
   * @example
   * // get the paint properties for the "marine area/1" layer
   * const paintProperties = vtLayer.getPaintProperties("Marine area/1");
   *
   * // change the fill-color paint property for the layer.
   * paintProperties["fill-color"] = "#93cfc7";
   * vtLayer.setPaintProperties("Marine area/1", paintProperties);
   */
  setPaintProperties(layerId: string, painter: any): void;
  /**
   * Changes the sprite source associated with the VectorTileLayer's [current style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * The sprite source must meet requirements of the [vector tiles style spec](https://maplibre.org/maplibre-style-spec/sprite/),
   * which consists of an index and image file. The sprite source can be set via URL to fetch the sprite resources or via image info to set the sprites directly on the layer.
   *
   * Release specific changes:
   * * At version 4.23, only the url string of sprite source can be passed to `setSpriteSource()` method.
   * * At version 4.25, [SpriteSourceImageInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-types.html#SpriteSourceImageInfo) or [SpriteSourceUrlInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-types.html#SpriteSourceUrlInfo) can be passed to `setSpriteSource()` method.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This method is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
   *
   * @param spriteSourceInfo - The sprite source info is used
   * to set the sprites in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo). The user can set the sprite source from a URL to fetch the sprite resources or from the image info
   * to set the sprite resources directly on the layer.
   * @param options - An object with the following properties.
   * @returns When resolved, [SpriteSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SpriteSource.html)
   * object is returned.
   * @since 4.23
   * @example
   * // update the layer's sprite resources by fetching sprite resources
   * // from the given url
   * const spriteUrl = "link-to-your-sprite-source";
   * vtLayer.setSpriteSource({
   *   type: "url",
   *   spriteUrl,
   *   pixelRatio: window.devicePixelRatio
   *  }).then((results)=>{
   *   console.log("setSpriteSource results", results);
   *   // do additional style updates here
   *   // change the background layer's sprite
   *   const sl = vtLayer.getStyleLayer("background");
   *   sl.paint["background-pattern"] =
   *     sl.paint["background-pattern"] === "Polygon" ? "Waves"  : "Polygon";
   *   vtLayer.setStyleLayer(sl);
   * });
   * @example
   * // set sprites source from an image info directly on the layer
   * fetchSprites(spriteUrl, pixelRatio).then((params) => {
   *   vtLayer.setSpriteSource(params).then((results)=>{
   *     console.log("setSpriteInfo results", results);
   *     const sl = vtLayer.getStyleLayer("background");
   *     sl.paint["background-pattern"] =
   *       sl.paint["background-pattern"] === "Polygon" ? "Waves"  : "Polygon";
   *     vtLayer.setStyleLayer(sl);
   *   });
   * });
   *
   * async function fetchSprites(url, pixelRatio) {
   *   // get the index and image files from specified location
   *   const jsonUrl = `${url}${pixelRatio > 1.25 ? "@2x" : ""}.json`;
   *   const imageUrl = `${url}${pixelRatio > 1.25 ? "@2x" : ""}.png`;
   *
   *   const [jsonResult, imageResult] = await Promise.all([
   *     esriRequest(jsonUrl, { responseType: "json" }),
   *     esriRequest(imageUrl, { responseType: "image" })
   *   ]);
   *
   *   // load the appropriate files depending on device pixel ratio
   *   const spriteSource = `spriteSource${pixelRatio > 1.25 ? "2" : "1"}x`;
   *
   *   return new SpriteSourceImageInfo({
   *     type: "image",
   *     [spriteSource]: {
   *       image: imageResult.data,
   *       json: jsonResult.data
   *     },
   *     spriteUrl: url
   *   });
   * }
   */
  setSpriteSource(spriteSourceInfo: SpriteSourceInfo, options?: AbortOptions): Promise<SpriteSource | null | undefined>;
  /**
   * Changes the layer properties of the specified [style layer](https://maplibre.org/maplibre-style-spec/layers/).
   * It can be used to rewrite or change any of the properties of a [style layer](https://maplibre.org/maplibre-style-spec/layers/)
   * including `filter`, `source-layer`, `layout` and `paint`. You can also use this method to add new style layers to the current style
   * or re-order existing style layers.
   * When `setStyleLayer()` is called, it might change how the layer looks or which features are displayed. To make sure everything matches the new style,
   * the vector tile data (the PBF files) is fetched from the service.
   *
   * Use [setLayoutProperties()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setLayoutProperties) method if you are only changing the layout properties of a style layer.
   * Use [setPaintProperties](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#setPaintProperties) method to change only paint properties of a style layer.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This method is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
   *
   * @param layer - The [style layer](https://maplibre.org/maplibre-style-spec/layers/)
   * specified in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo). Get an instance of a style layer from a loaded style using
   * [getStyleLayer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#getStyleLayer) method.
   * @param index - Index of the style layer in the style. Set this parameter when adding a new style layer or re-ordering a style layer.
   * @since 4.18
   * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
   * @example
   * // change style layer paint and layout properties at once
   * let styleLayer = layer.getStyleLayer("City small scale/x large admin0 capital");
   * styleLayer.paint["text-color"] = "#e400e0";
   * styleLayer.paint["text-halo-color"] = "#e400e0";
   * styleLayer.layout["icon-size"] = 1.5;
   * layer.setStyleLayer(styleLayer);
   */
  setStyleLayer(layer: any, index?: number): void;
  /**
   * Toggles the visibility of the specified [style layer](https://maplibre.org/maplibre-style-spec/layers/) in the
   * VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This method is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
   *
   * @param layerId - The style layer [id](https://maplibre.org/maplibre-style-spec/layers/#id)
   * as specified in the VectorTileLayer's [currentStyleInfo.style](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#currentStyleInfo).
   * @param visibility - Set this parameter to `"none"` to hide the style layer or to `"visible"` to show the style layer.
   * @since 4.18
   * @see [Sample - VectorTileLayer - update style layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer-style/)
   * @example
   * // hide the grassland style layer in the style.
   * // Will not be visible in the view.
   * layer.setStyleLayerVisibility("landcover/grassland", "none");
   */
  setStyleLayerVisibility(layerId: string, visibility: "none" | "visible"): void;
}
declare const VectorTileLayerSuperclass: typeof Layer & typeof MultiOriginJSONMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof PortalLayer & typeof OperationalLayer & typeof ArcGISService & typeof ArcGISCachedService & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof BlendLayer

export interface VectorTileLayerCurrentStyleInfo {
  /** Absolute template URL for font sets included in a style. The URL includes `{fontstack}` and `{range}` tokens. */
  glyphsUrl?: string | null;
  /** Vector tile service information. */
  layerDefinition: any;
  /** Absolute URL for a vector tile service. */
  serviceUrl?: string | null;
  /** Absolute URL for sprites included in a style. */
  spriteUrl?: string | null;
  /**
   * Style JSON object for vector tiles. Style object includes `version` of the style specification,
   * `sprite` and `glyphs` properties. It adheres to [version 8 of the MapLibre style specification](https://maplibre.org/maplibre-style-spec/).
   */
  style: any;
  /** Absolute URL for vector tile service style. */
  styleUrl?: string | null;
}