import type Extent from "../../geometry/Extent.js";
import type PointCloudLayer from "../../layers/PointCloudLayer.js";
import type FeatureSet from "../../rest/support/FeatureSet.js";
import type Query from "../../rest/support/Query.js";
import type LayerView from "./LayerView.js";
import type { ResourceHandle } from "../../core/Handles.js";
import type { AbortOptions } from "../../core/promiseUtils.js";
import type { QueryProperties } from "../../rest/support/Query.js";
import type { HighlightTarget } from "../types.js";
import type { LayerViewHighlightOptions } from "./types.js";

export interface PointCloudLayerViewMixinProperties {}

/**
 * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/)
 * after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
 *
 * The PointCloudLayerView is responsible for streaming and rendering a [PointCloudLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/)
 * point cloud in the [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
 *
 * @since 4.13
 * @see [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/)
 */
export abstract class PointCloudLayerViewMixin {
  constructor(...args: any[]);
  /**
   * A list of attribute fields fetched for each point including fields required for layer
   * [rendering](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/#renderer) and additional fields defined on the
   * [PointCloudLayer.outFields](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/#outFields).
   * The availableFields is populated when the layer view is finished [updating](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/#updating). Use this list when
   * querying points on the [client](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#queryFeatures).
   *
   * @see [PointCloudLayer.outFields](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/#outFields)
   */
  get availableFields(): string[];
  /** The point cloud layer being viewed. */
  get layer(): PointCloudLayer;
  /**
   * Creates query parameter object that can be used to fetch points as they are being
   * displayed. It sets the query parameter's [Query.outFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outFields)
   * property to `["*"]` and [Query.returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnGeometry) to `true`.
   * The output spatial reference is set to the spatial reference of the view.
   *
   * @returns The query object
   */
  createQuery(): Query;
  /**
   * Highlights the given point(s).
   *
   * @param target - The point(s) to highlight. A graphic representing a point to highlight can be obtained by using
   *   [SceneView.hitTest()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#hitTest).
   * @param options - An object with the following properties.
   * @returns Returns a highlight handler with a `remove()` method that
   * can be called to remove the highlight.
   * @see [SceneView.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#highlights)
   * @example
   * // Use the default highlights collection to apply a highlight to points when you hover over them
   *
   * // A handler can be used to remove any previous highlight when applying a new one
   * let hoverHighlight;
   *
   * view.on("pointer-move", (event) => {
   *   // Search for the first feature in the layer at the hovered location
   *   view.hitTest(event).then((response) => {
   *     if (response.results[0]) {
   *       const graphic = response.results[0].graphic;
   *       view.whenLayerView(graphic.layer).then((layerView) => {
   *         // Remove any previous highlight, if it exists
   *         hoverHighlight?.remove();
   *         // Highlight the hit points with the temporary highlight options, which are pre-configured for this use case
   *         hoverHighlight = layerView.highlight(graphic, { name: "temporary" });
   *       });
   *     }
   *   });
   * });
   */
  highlight(target: HighlightTarget, options?: LayerViewHighlightOptions): ResourceHandle;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) against points in the layer view and
   * returns the 3D [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/) of points that satisfy the query. If query parameters are
   * not provided, the extent and count of all loaded points are returned.
   *
   * For making attribute based queries on a PointCloudLayerView you need to specify the required fields
   * in the [PointCloudLayer.outFields](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/#outFields) property of the PointCloudLayer to ensure that attribute values are
   * available on the client for querying. You can use [availableFields](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#availableFields)
   * to inspect which fields are available on the client.
   *
   * @param query - Specifies the attributes and spatial filter of the query.
   * When no parameters are passed to this method, all points on the client are returned.
   * @param options - An object with the following properties.
   * @returns When resolved, returns the extent and count of the points
   * that satisfy the input query. See the object specification table below for details.
   * Property | Type | Description
   * ---------|------|-------------
   * count | Number | The number of points that satisfy the input query.
   * extent | [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/) | The extent of the points that satisfy the query.
   */
  queryExtent(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<{
      count: number;
      extent: Extent | null;
  }>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) against points in the layer view
   * and returns the number of points that satisfy the query. If query parameters are not provided,
   * the count of all loaded points is returned.
   *
   * For making attribute based queries on a PointCloudLayerView you need to specify the required fields
   * in the [PointCloudLayer.outFields](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/#outFields) property of the PointCloudLayer to ensure that attribute values are
   * available on the client for querying. You can use [availableFields](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#availableFields)
   * to inspect which fields are available on the client.
   *
   * @param query - Specifies the attributes and spatial filter of the query.
   * When no parameters are passed to this method, all points on the client are returned. To only return points
   * visible in the view, set the `geometry` parameter in the query object to the view's visible area.
   * @param options - An object with the following properties.
   * @returns When resolved, returns the number of points satisfying the query.
   */
  queryFeatureCount(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<number>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) against points in the layer view
   * and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/FeatureSet/). If query parameters are not provided,
   * all loaded points are returned.
   *
   * For making attribute based queries on a PointCloudLayerView you need to specify the required fields
   * in the [PointCloudLayer.outFields](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/#outFields) property of the PointCloudLayer to ensure that attribute values are
   * available on the client for querying. You can use [availableFields](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#availableFields)
   * to inspect which fields are available on the client.
   *
   * @param query - Specifies the attributes and spatial filter of the query.
   * When no parameters are passed to this method, all points on the client are returned along with their attributes
   * specified in [availableFields](https://developers.arcgis.com/javascript/latest/references/core/views/layers/PointCloudLayerView/#availableFields). To only return points
   * visible in the view, set the `geometry` parameter in the query object to the view's visible area.
   * @param options - An object with the following properties.
   * @returns When resolved, a [FeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/FeatureSet/) is returned.
   */
  queryFeatures(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<FeatureSet>;
}

export abstract class PointCloudLayerView extends PointCloudLayerViewSuperclass {}
declare const PointCloudLayerViewSuperclass: & typeof LayerView & typeof PointCloudLayerViewMixin