import type Layer from "../../layers/Layer.js";
import type { EventedAccessor, EventedMixinProperties } from "../../core/Evented.js";
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
import type { EsriPromiseMixin, EsriPromiseMixinProperties } from "../../core/Promise.js";
import type { MapViewOrSceneView } from "../MapViewOrSceneView.js";

export interface LayerViewProperties extends EventedMixinProperties, EsriPromiseMixinProperties, IdentifiableMixinProperties {
  /**
   * When `true`, the layer is visible in the view. Value of this property is inherited from the `layer.visible` unless the developer overrides it.
   * The `layerView.visible` will take precedence over `layer.visible` if both properties are set.
   *
   * @default true
   */
  visible?: boolean | null;
}

/**
 * Represents the view for a single layer after it has been added to either a
 * [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
 *
 * @since 4.0
 * @see [View#whenLayerView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#whenLayerView)
 * @see [MapView#whenLayerView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#whenLayerView)
 * @see [SceneView#whenLayerView()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#whenLayerView)
 */
export default abstract class LayerView extends LayerViewSuperclass {
  /** The layer being viewed. */
  get layer(): Layer;
  /**
   * Indicates if the  [View2D#spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is supported by the layer view.
   * When `false` layer view will be [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended).
   *
   * @since 4.23
   * @see [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended)
   */
  get spatialReferenceSupported(): boolean;
  /**
   * Value is `true` if the layer is suspended (i.e., layer will not redraw or update
   * itself when the extent changes).
   *
   * @see [spatialReferenceSupported](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#spatialReferenceSupported)
   */
  get suspended(): boolean;
  /**
   * Indicates if the layer view is making any updates that will impact what is displayed on the map.
   * For example, this value is `true` when renderer, definitionExpression, filter or effect is changed or
   * if the layer view is in the process of the fetching data.
   *
   * Watch [FeatureLayerView#dataUpdating](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#dataUpdating) property instead to only
   * know when the data has been updated (e.g. to run statistics query on all feature available in the layer view).
   *
   * @default false
   * @example
   * // Check for the first time layerView.updating becomes false. Then query for
   * // features that are visible within the view associated with the layer view.
   * await reactiveUtils.whenOnce(() => !layerView.updating);
   * const query = layerView.createQuery();
   * query.geometry = layerView.view.extent;
   * const result = layerView.queryFeatures(query);
   */
  get updating(): boolean;
  /**
   * 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) associated with the layer view.
   *
   * @since 4.28
   * @example
   * // Check for the first time layerView.updating becomes false. Then query for
   * // features that are visible within the view associated with the layer view.
   * await reactiveUtils.whenOnce(() => !layerView.updating);
   * const query = layerView.createQuery();
   * query.geometry = layerView.view.extent;
   * const result = layerView.queryFeatures(query);
   */
  get view(): MapViewOrSceneView;
  /**
   * When `true`, the layer is visible in the view. Value of this property is inherited from the `layer.visible` unless the developer overrides it.
   * The `layerView.visible` will take precedence over `layer.visible` if both properties are set.
   *
   * @default true
   */
  get visible(): boolean;
  set visible(value: boolean | null | undefined);
  /**
   * When `true`, the layer is visible in the view at the current scale. This applies to layers that have `minScale` and `maxScale` properties set.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > This property is not supported in 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) tiled layers.
   *
   * @default true
   * @since 4.30
   * @see [visibleAtCurrentTimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#visibleAtCurrentTimeExtent)
   * @see [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended)
   */
  get visibleAtCurrentScale(): boolean;
  /**
   * When `true`, the layer is visible in the view's [View#timeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#timeExtent). This applies to layers that have a [Layer#visibilityTimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#visibilityTimeExtent).
   *
   * @default true
   * @since 4.30
   * @see [visibleAtCurrentScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#visibleAtCurrentScale)
   * @see [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended)
   */
  get visibleAtCurrentTimeExtent(): boolean;
}
declare const LayerViewSuperclass: typeof EventedAccessor & typeof EsriPromiseMixin & typeof IdentifiableMixin