import type WebMap from "../WebMap.js";
import type WebScene from "../WebScene.js";
import type Widget from "./Widget.js";
import type FloorFilterViewModel from "./FloorFilter/FloorFilterViewModel.js";
import type { Icon } from "@esri/calcite-components/components/calcite-icon";
import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
import type { HeadingLevel } from "./support/types.js";
import type { FloorFilterViewModelProperties } from "./FloorFilter/FloorFilterViewModel.js";
import type { WidgetProperties } from "./Widget.js";

export interface FloorFilterProperties extends WidgetProperties, Partial<Pick<FloorFilter, "facility" | "headingLevel" | "level" | "longNames" | "site" | "view">> {
  /**
   * Icon displayed in the widget's button.
   *
   * @default "urban-model"
   * @since 4.27
   * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/)
   * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/)
   */
  icon?: Icon["icon"] | null;
  /**
   * The view model for this widget. This is a class that contains all the logic
   * (properties and methods) that controls this widget's behavior. See the
   * [FloorFilterViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter-FloorFilterViewModel.html) class to access
   * all properties and methods on the widget.
   */
  viewModel?: FloorFilterViewModelProperties;
}

/**
 * The FloorFilter widget simplifies visualization of GIS data for a specific floor of a
 * building in your application. It allows you to filter down the floor plan data displayed in your
 * [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) to a [site](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html#site), a [facility](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html#facility) in the site, or a [level](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html#level) in the facility.
 *
 * To visualize your data based on [site](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html#site), [facility](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html#facility), or [level](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html#level), your map must contain the related
 * floor plan layers, with features linked together in a floor plan hierarchy.
 * Once you define your map as floor-aware in the map properties, the interactive, on-screen
 * FloorFilter widget appears and can be used to explore the floor-aware data based on the
 * configured site, facility, and levels layers.
 * The [FloorFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter.html) widget currently supports [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) and [MapImageLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html) (map services).
 *
 * The widget can also be used alongside other filtering functionalities, such as definition queries,
 * selection, range, and time, to further control visualization.
 * For example, you may want to visualize all of the features on a specific level in a facility,
 * or all the office units within a range of levels in a facility.
 *
 * > [!WARNING]
 * >
 * > **Note**
 * >
 * > If a default site, facility, or level is selected in the floor filter when sharing a floor-aware web map from ArcGIS Pro, it will also be the default selection within the FloorFilter widget.
 *
 * @since 4.19
 * @see [FloorFilterViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter-FloorFilterViewModel.html)
 * @see [Sample - FloorFilter widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-floorfilter/)
 * @see [Sample - FloorFilter component](https://developers.arcgis.com/javascript/latest/sample-code/floorfilter/)
 * @example
 * // Initialize FloorFilter
 * const floorFilter = new FloorFilter({
 *   view: view
 * });
 */
export default class FloorFilter extends Widget {
  constructor(properties?: FloorFilterProperties);
  /** The currently selected facility. */
  accessor facility: string | null | undefined;
  /**
   * Indicates the heading level to use for the headings separating floors in buildings.
   * By default, the building name is rendered
   * as a level 2 heading (e.g. `<h2>Building name</h2>`). Depending on the widget's placement
   * in your app, you may need to adjust this heading for proper semantics. This is
   * important for meeting accessibility standards.
   *
   * @default 2
   * @since 4.20
   * @see [Heading Elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)
   * @example
   * // building headings will render as an <h3>
   * floorFilter.headingLevel = 3;
   */
  accessor headingLevel: HeadingLevel;
  /**
   * Icon displayed in the widget's button.
   *
   * @default "urban-model"
   * @since 4.27
   * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/)
   * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/)
   */
  get icon(): Icon["icon"];
  set icon(value: Icon["icon"] | null | undefined);
  /** The currently selected floor level. */
  accessor level: string | null | undefined;
  /**
   * Determines if the widget is expanded or collapsed.
   * If the value is `true`, the widget is expanded and the long names appear.
   * Otherwise, short names are used and icons appear alone on buttons.
   */
  accessor longNames: boolean;
  /** The currently selected site. */
  accessor site: string | null | undefined;
  /**
   * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
   * If this property is set, the FloorFilter widget will update the view's [MapView#floors](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#floors)
   * property whenever the floor filter is manipulated or updated programmatically. This property will affect
   * any floor-aware layer in the view.
   */
  accessor view: MapViewOrSceneView | null | undefined;
  /**
   * The view model for this widget. This is a class that contains all the logic
   * (properties and methods) that controls this widget's behavior. See the
   * [FloorFilterViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter-FloorFilterViewModel.html) class to access
   * all properties and methods on the widget.
   */
  get viewModel(): FloorFilterViewModel;
  set viewModel(value: FloorFilterViewModelProperties);
  /**
   * Updates the [FloorFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-widgets-FloorFilter.html) widget definition in the provided [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html).
   *
   * @param webmap - The webmap to be updated.
   * @since 4.19
   */
  updateWebDocument(webmap: WebMap | WebScene): void;
}