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

/** @since 5.0 */
export interface BuildingFieldStatisticsProperties extends Partial<Pick<BuildingFieldStatistics, "fieldName" | "label" | "max" | "min" | "modelName" | "mostFrequentValues" | "subLayerIds">> {}

/**
 * Summary statistics for a field in a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/). 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 class BuildingFieldStatistics extends JSONSupport {
  constructor(properties?: BuildingFieldStatisticsProperties);
  /** 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[];
}