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

/**
 * Summary statistics for a field in a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html). The statistics
 * contain the most frequent values in that layer, minimum and maximum values in case they are numeric
 * and the sublayers where the field is available.
 */
export default abstract class BuildingFieldStatistics extends JSONSupport {
  /** Name of the field. */
  accessor fieldName: string;
  /** Label of the field. */
  accessor label: string;
  /** Maximum value of the field for numeric values. */
  accessor max: number;
  /** Minimum value of the field for numeric values. */
  accessor min: number;
  /** Model Name of the field. This can be used to identify certain special fields, like floor number, or phase id. */
  accessor modelName: string;
  /** List of the most frequent values of the field. This is not guaranteed to be a complete list of all values. */
  accessor mostFrequentValues: number[] | string[];
  /** List of sublayer ids where this field is available. */
  accessor subLayerIds: number[];
}