import type Layer from "../../../layers/Layer.js";

/**
 * This class contains performance information like memory usage and number of features for a specific layer.
 *
 * > [!WARNING]
 * >
 * > **This class is experimental** and should be used for debugging purposes only.
 * > Its interface will change in future releases.
 *
 * @since 4.15
 * @see [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html)
 * @see [Sample - SceneView memory resources](https://developers.arcgis.com/javascript/latest/sample-code/sceneview-memory/)
 */
export default abstract class LayerPerformanceInfo {
  /**
   * The number of features displayed in the SceneView. This
   * property is only available for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html),
   * [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and
   * [point SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html).
   *
   * @default 0
   */
  readonly displayedNumberOfFeatures: number;
  /** The layer corresponding to the memory usage information. */
  readonly layer?: Layer | null;
  /**
   * The maximum number of features that can be displayed in the layer.
   *
   * This number depends on the symbol complexity and [quality profile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#qualityProfile) of the SceneView.
   * If you want to increase it manually, set the
   * [FeatureLayerView.maximumNumberOfFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#maximumNumberOfFeatures)
   * property. This property is only available for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html),
   * [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and
   * [point SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html).
   */
  readonly maximumNumberOfFeatures?: number | null;
  /**
   * An estimate of the memory currently in use by the layer, in bytes.
   *
   * @default 0
   */
  readonly memory: number;
  /**
   * The total number of features contained in the layer. This
   * property is only available for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) and
   * [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html).
   */
  readonly totalNumberOfFeatures?: number | null;
}