/**
 * This object contains helper methods for generating a [VectorFieldRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-VectorFieldRenderer.html) for a
 * `Vector-UV` or `Vector-MagDir` [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html) or
 * [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html).
 *
 * The [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-raster-renderers-vectorField.html#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/api-reference/esri-layers-ImageryTileLayer.html) and
 * > [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html) 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/api-reference/esri-views-MapView.html).
 *
 * @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/api-reference/esri-renderers-VectorFieldRenderer.html#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/api-reference/esri-renderers-VectorFieldRenderer.html#style) for more information.
   */
  style?: VectorFieldRenderer["style"];
}

/**
 * The result object of the [createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-raster-renderers-vectorField.html#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/api-reference/esri-renderers-VectorFieldRenderer.html) 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.
 *   See the table below for details of each parameter.
 * @returns Resolves
 *   to an object containing a VectorFieldRenderer that can be set on the input layer.
 */
export function createRenderer(parameters: VectorFieldRendererParameters): Promise<VectorFieldRendererResult>;