/**
 * This object contains helper methods for generating a [VectorFieldRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/VectorFieldRenderer/) for a
 * `Vector-UV` or `Vector-MagDir` [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/) or
 * [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/).
 *
 * The [createRenderer()](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/raster/renderers/vectorField/#createRenderer) method in this module generates a renderer that may be
 * applied directly to the input layer.
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > VectorFieldRenderer is only supported with [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/) and
 * > [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/) where the
 * > [source type](https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/raster-dataset-properties.htm)
 * > is `Vector-UV` or `Vector-MagDir`.
 * > VectorFieldRenderer is only supported in 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
 *
 * @since 4.20
 */
import type VectorFieldRenderer from "../../../renderers/VectorFieldRenderer.js";
import type { RotationType } from "../../../core/quantity.js";
import type { RasterRendererParameters } from "./types.js";

export interface VectorFieldRendererParameters extends RasterRendererParameters {
  /**
   * Defines the flow direction of the
   *   data. This can be modified to display meteorological (the direction it is flowing from) or
   *   oceanographic data (the direction it is flowing to). See [VectorFieldRenderer.flowRepresentation](https://developers.arcgis.com/javascript/latest/references/core/renderers/VectorFieldRenderer/#flowRepresentation) for more information.
   */
  flowRepresentation?: VectorFieldRenderer["flowRepresentation"];
  /**
   * Defines the origin and direction of rotation depending on how
   *   the angle of rotation was measured. This property only applies to rotations around the `heading` axis.
   */
  rotationType?: RotationType;
  /**
   * The predefined symbol styles used to represent
   * the vector flow. See [VectorFieldRenderer.style](https://developers.arcgis.com/javascript/latest/references/core/renderers/VectorFieldRenderer/#style) for more information.
   */
  style?: VectorFieldRenderer["style"];
}

/**
 * The result object of the [createRenderer()](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/raster/renderers/vectorField/#createRenderer) method. See the table
 * below for details of each property.
 */
export interface VectorFieldRendererResult {
  /**
   * The VectorFieldRenderer renderer to apply
   *   to the input layer.
   */
  renderer: VectorFieldRenderer;
}

/**
 * Generates a [VectorFieldRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/VectorFieldRenderer/) to display raster data with vector symbols.
 * This renderer is often used for visualizing flow direction and magnitude information in meteorology
 * and oceanography raster data.
 *
 * @param parameters - Input parameters for generating a vector field visualization.
 * @returns Resolves
 *   to an object containing a VectorFieldRenderer that can be set on the input layer.
 */
export function createRenderer(parameters: VectorFieldRendererParameters): Promise<VectorFieldRendererResult>;