import type GraphicOrigin from "./GraphicOrigin.js";
import type VectorTileLayer from "../layers/VectorTileLayer.js";

/**
 * Provides information about the [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) from which a graphic originates.
 * Origin information maybe available when a graphic is returned from methods such as [MapView#hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) method.
 * You can access the graphic's origin through the graphic's [Graphic#origin](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#origin) property.
 *
 * The origin information contains the style layer's [id](https://maplibre.org/maplibre-style-spec/layers/#id) and layer index
 * within the [vector tile style](https://doc.arcgis.com/en/arcgis-online/reference/tile-layers.htm#ESRI_SECTION1_8F68399EB47B48FF9EF46719FCC96978).
 * Spatial information about the actual feature represented in the style layer is returned only
 * if the style layer is a [symbol layer](https://maplibre.org/maplibre-style-spec/layers/#symbol). Otherwise, the graphic's geometry is `null`.
 *
 * @since 4.34
 * @see [MapView#hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest)
 * @see [Map component hitTest()](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/#hitTest)
 */
export default class VectorTileGraphicOrigin extends GraphicOrigin {
  constructor(layer: VectorTileLayer, layerId: string, layerIndex: number);
  /** The [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html) from which a graphic originates. */
  readonly layer: VectorTileLayer;
  /**
   * The [unique identifier](https://maplibre.org/maplibre-style-spec/layers/#id) of the style layer in the
   * [vector tile style](https://maplibre.org/maplibre-style-spec).
   */
  readonly layerId: string;
  /** The layer index of the style layer in the [vector tile style](https://maplibre.org/maplibre-style-spec). */
  readonly layerIndex: number;
  /** The type of the graphic origin. */
  readonly type: "vector-tile";
}