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

export interface LevelLayerInfoProperties extends Partial<Pick<LevelLayerInfo, "facilityIdField" | "layerId" | "levelIdField" | "levelNumberField" | "longNameField" | "shortNameField" | "sublayerId" | "verticalOrderField">> {}

/**
 * The LevelLayerInfo class describes the footprint of each occupiable floor contained in a managed facility. The [FloorFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html) widget uses this class to identify what floor levels exist in the layer to use for filtering.
 *
 * @since 4.19
 * @see [FloorFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html)
 * @see [MapFloorInfo.levelLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-MapFloorInfo.html#levelLayer)
 */
export default class LevelLayerInfo extends JSONSupport {
  constructor(properties?: LevelLayerInfoProperties);
  /** The field name from the layer that defines the unique ID of a feature's associated facility. This is used to identify the feature's associated facility feature in floor-aware maps. A feature can only be related to a single facility using this field. */
  accessor facilityIdField: string | null | undefined;
  /** The id for an operational layer in the map. This allows LevelLayerInfo to refer to an operational layer that contains level features. When configuring a floor-aware map manually, as opposed to configuring it in ArcGIS Pro, this value needs to be set with the ID value from the appropriate Layer object, whether a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html). */
  accessor layerId: string | null | undefined;
  /** The field name from the layer that defines a unique ID for the feature. */
  accessor levelIdField: string | null | undefined;
  /** The field name from the layer that defines the level floor number in a particular facility. */
  accessor levelNumberField: string | null | undefined;
  /** The field name from the layer that defines the level name of a feature. The level name is used to support floor filtering in floor-aware apps. */
  accessor longNameField: string | null | undefined;
  /** The field name from the layer that defines the level short name of a feature. The level short name supports floor filtering in floor-aware apps. Some floor-aware apps only display a short name in the floor filter, others may use the [longNameField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LevelLayerInfo.html#longNameField) or allow toggling between the two. */
  accessor shortNameField: string | null | undefined;
  /**
   * This value references the numeric ID of the sublayer if the Level layer is a
   * map service sublayer instead of a feature layer.
   */
  accessor sublayerId: number | null | undefined;
  /**
   * The field name from the layer that defines the order of display and reference to floors in the [Indoor Positioning System](https://doc.arcgis.com/en/indoors/android/configure-indoor-positioning.htm).
   * It uses a zero-based ordering system to define the floor order. The ground level of each facility is represented as zero. Positive values represent floors above ground, and negative values represent floors below ground. Values must be continuous and a value in the sequence cannot be skipped.
   */
  accessor verticalOrderField: string | null | undefined;
}