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

/** @since 5.0 */
export interface FloorFilterProperties extends Partial<Pick<FloorFilter, "enabled" | "facility" | "floorVisibilityMode" | "level" | "longNames" | "minimized" | "pinnedLevels" | "site" | "useVerticalOrder">> {}

/** @since 5.1 */
export type FloorVisibilityMode = "belowSelected" | "selectedOnly";

/**
 * Floor filtering is controlled by a configurable [floor filter](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/). Those configurations are
 * saved to the web map as a Floor Filter widget.
 *
 * @since 5.0
 */
export default class FloorFilter extends JSONSupport {
  constructor(properties?: FloorFilterProperties);
  /**
   * Indicates whether the FloorFilter is active and filtering the displayed content according to the [FloorFilter](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/) selection.
   *
   * @default false
   * @since 5.0
   */
  accessor enabled: boolean;
  /**
   * Contains the facility ID for the initially selected [FloorFilter.facility](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/#facility) in the floor filter.
   *
   * @since 5.0
   */
  accessor facility: string | null | undefined;
  /**
   * Indicates whether the floor filter should display the selected floor and all floors below it or only the selected floor.
   *
   * > [!NOTE]
   * > Floor Visibility mode is only applicable in web scenes.
   *
   * @default "selectedOnly"
   * @since 5.1
   */
  accessor floorVisibilityMode: FloorVisibilityMode;
  /**
   * Contains the level ID for the initially selected [floor](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/#level), which is used when filtering layers by their configured floor-aware properties.
   *
   * @since 5.0
   */
  accessor level: string | null | undefined;
  /**
   * Indicates whether the levels list is showing the long names from [FloorFilter](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/).
   *
   * @default false
   * @since 5.0
   */
  accessor longNames: boolean;
  /**
   * Indicates whether the floor filter has been minimized to show only the levels list.
   *
   * @default false
   * @since 5.0
   */
  accessor minimized: boolean;
  /**
   * Indicates whether the levels portion of the floor filter has been pinned to show the levels list.
   *
   * @default false
   * @since 5.0
   */
  accessor pinnedLevels: boolean;
  /**
   * Contains the site ID for the initially selected [FloorFilter.site](https://developers.arcgis.com/javascript/latest/references/core/widgets/FloorFilter/#site) in the floor filter.
   *
   * @since 5.0
   */
  accessor site: string | null | undefined;
  /**
   * Indicates whether the floor filter should use vertical order for floor filtering across multiple facilities.
   *
   * @default false
   * @since 5.0
   */
  accessor useVerticalOrder: boolean;
}