import type Color from "../Color.js";
import type AuthoringInfo from "./support/AuthoringInfo.js";
import type RendererLegendOptions from "./support/RendererLegendOptions.js";
import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
import type { VisualVariable } from "./types.js";
import type { VisualVariablesMixin, VisualVariablesMixinProperties } from "./mixins/VisualVariablesMixin.js";
import type { ColorVariableProperties } from "./visualVariables/ColorVariable.js";
import type { OpacityVariableProperties } from "./visualVariables/OpacityVariable.js";
import type { RotationVariableProperties } from "./visualVariables/RotationVariable.js";
import type { SizeVariableProperties } from "./visualVariables/SizeVariable.js";
import type { ColorLike } from "../Color.js";
import type { AuthoringInfoProperties } from "./support/AuthoringInfo.js";
import type { RendererLegendOptionsProperties } from "./support/RendererLegendOptions.js";

export interface FlowRendererProperties extends JSONSupportMixinProperties, VisualVariablesMixinProperties, Partial<Pick<FlowRenderer, "density" | "flowRepresentation" | "flowSpeed" | "trailCap" | "trailLength">> {
  /**
   * Contains metadata about renderers generated from the
   * [flowRendererCreator.createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-raster-renderers-flow.html#createRenderer) method,
   * including information for setting UI elements such as sliders and themes. This allows the authoring clients to save specific overridable settings
   * so user selections can be remembered the next time they are accessed via the UI.
   *
   * @since 4.23
   */
  authoringInfo?: AuthoringInfoProperties;
  /**
   * The color of the animated streamlines.
   *
   * @default [255, 255, 255, 1]
   */
  color?: ColorLike;
  /**
   * An object providing options for displaying the renderer in the Legend.
   *
   * @since 4.23
   * @example
   * renderer.legendOptions = {
   *   title: "Wind speed",
   *   order: "descending-values",
   * };
   */
  legendOptions?: RendererLegendOptionsProperties | null;
  /**
   * The maximum path length streamlines will travel in points. Only a portion of the streamline will be visible at a
   * time depending on the magnitude or UV coming from the raster layer and the defined [trailLength](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailLength).
   * During the course of the animation, the visible streamline will travel to reach the path length defined here, then
   * will restart. This value may be autocast with a string expressing size in points or pixels (e.g. `100px`).
   *
   * @default 200
   * @example
   * // width in points
   * flowRenderer.maxPathLength = 100;
   * @example
   * // width in pixels
   * flowRenderer.maxPathLength = "200px";
   * @example
   * // width in points
   * flowRenderer.maxPathLength = "100pt";
   */
  maxPathLength?: number | string;
  /**
   * The width of the streamline trail in points. This value may be autocast with a string
   * expressing size in points or pixels (e.g. `3px`).
   *
   * @default 1.5
   * @example
   * // width in points
   * flowRenderer.trailWidth = 4;
   * @example
   * // width in pixels
   * flowRenderer.trailWidth = "2px";
   * @example
   * // width in points
   * flowRenderer.trailWidth = "4pt";
   */
  trailWidth?: number | string;
  /**
   * An array of [VisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-VisualVariable.html) objects.
   * Each object must indicate
   * the type of visual variable to apply (e.g. [ColorVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html)), the numeric
   * field from which to drive the visualization, and the visual values to map to the data.
   * The following list identifies each visual variable type that is supported with the `FlowRenderer` and provides a link to the specification table
   * of each: [ColorVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html),
   * [OpacityVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html), and [SizeVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
   * `SizeVisualVariable` will update the [trailWidth](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailWidth) property.
   *
   * When setting fields for the visual variables set on the FlowRenderer, use the `Magnitude` field. `Magnitude` will return pixel values from the
   * first band. If the data represents u (zonal) and v (meridional) speed components, values are automatically converted
   * to `Magnitude` and `Direction`.
   *
   * @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
   * @example
   * const renderer = new FlowRenderer({
   *    visualVariables: [{
   *       type: "color",
   *       field: "Magnitude",
   *       stops: [
   *         { value: 3, color: "#0080ff" },
   *         { value: 15, color: "#00ff00" }
   *       ]
   *     }, {
   *       type: "opacity",
   *       field: "Magnitude",
   *       stops: [
   *         { value: 1, opacity: 0.5 },
   *         { value: 8, opacity: 1 }
   *       ]
   *    }]
   * });
   * @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
   */
  visualVariables?: ((ColorVariableProperties & {
      type: "color";
  }) | (SizeVariableProperties & {
      type: "size";
  }) | (OpacityVariableProperties & {
      type: "opacity";
  }) | (RotationVariableProperties & {
      type: "rotation";
  }))[] | null;
}

/**
 * The FlowRenderer allows you to visualize your raster data with animated streamlines.
 * This renderer can be used to visualize flow direction and magnitude information for meteorology and oceanography raster data.
 *
 * To use this renderer, the [source type of your raster dataset](https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/raster-dataset-properties.htm) must be `Vector-UV` or `Vector-MagDir`.
 * The direction of the raster defines the direction of movement, and the magnitude defines the visible length of the streamline.
 *
 * [![flow renderer](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/flow-renderer.gif)](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-afrenderer/)
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > The FlowRenderer 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).
 *
 * @since 4.23
 * @see [Sample - FlowRenderer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-afrenderer/)
 * @see [Sample - FlowRenderer with Blending and Effects](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-afrenderer-blending/)
 * @see [Sample - FlowRenderer in a 3D scene](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagerytilelayer-flow-3d-global/)
 * @see [Sample - FlowRenderer with elevation modes](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagerytilelayer-flow-3d-local/)
 * @example
 * const renderer = new FlowRenderer({
 *   density: 1,
 *   color: [50, 120, 240], // blue
 *   flowSpeed: 10,
 *   trailWidth: "2px"
 * });
 */
export default class FlowRenderer extends FlowRendererSuperclass {
  /**
   * @example
   * let renderer = {
   *   type: "flow",
   *   color: [50, 120, 240, 1]
   * }
   */
  constructor(properties?: FlowRendererProperties);
  /**
   * Contains metadata about renderers generated from the
   * [flowRendererCreator.createRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-raster-renderers-flow.html#createRenderer) method,
   * including information for setting UI elements such as sliders and themes. This allows the authoring clients to save specific overridable settings
   * so user selections can be remembered the next time they are accessed via the UI.
   *
   * @since 4.23
   */
  get authoringInfo(): AuthoringInfo;
  set authoringInfo(value: AuthoringInfoProperties);
  /**
   * The color of the animated streamlines.
   *
   * @default [255, 255, 255, 1]
   */
  get color(): Color;
  set color(value: ColorLike);
  /**
   * The density of the streamlines. This value determines how many streamlines appear in the visualization:
   * * A value less than or equal to 0 means no streamlines will be rendered.
   * * Values between 0 and 1 reduce the number of streamlines.
   * * Values greater than 1 increase the number of streamlines proportionally.
   *
   * > [!WARNING]
   * >
   * > **Notes**
   * > While density can exceed 1, the effective maximum number of streamlines is constrained by factors such as screen size and [trailLength](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailLength) property. At high densities, new streamlines may be discarded to avoid cluttered visualizations and excessive computation time.
   *
   * |`density = 0.1` | `density = 1` | `density = 1.5` |
   * |----------------|-----------------|---------------|
   * | ![density 0.1](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/density-01.png) | ![density 0.5](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/density-05.png) | ![density 1](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/density-1.png) |
   *
   * @default 0.8
   */
  accessor density: number;
  /**
   * Defines the flow direction of the data. This can be modified to display meteorological (the direction it is flowing from) or climatological data (the direction it is flowing to).
   *
   * Value | Description | Example
   * ------|-------------|---------
   * flow-from | Flow from angle. | ![flow-from](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/flow-from.png)
   * flow-to | Flow to angle. | ![flow-to](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/flow-to.png)
   *
   * @default "flow-from"
   */
  accessor flowRepresentation: "flow-from" | "flow-to";
  /**
   * The speed of the animated streamlines, relative to the simulation time. This serves as a multiple of the magnitude
   * from the raster layer. For instance, if the magnitude is 2ms, and the `flowSpeed` is 10, then the actual speed of
   * the streamline will be 20 pts/s. A speed of 0 will result in no animation.
   *
   * @default 10
   */
  accessor flowSpeed: number;
  /**
   * An object providing options for displaying the renderer in the Legend.
   *
   * @since 4.23
   * @example
   * renderer.legendOptions = {
   *   title: "Wind speed",
   *   order: "descending-values",
   * };
   */
  get legendOptions(): RendererLegendOptions | null | undefined;
  set legendOptions(value: RendererLegendOptionsProperties | null | undefined);
  /**
   * The maximum path length streamlines will travel in points. Only a portion of the streamline will be visible at a
   * time depending on the magnitude or UV coming from the raster layer and the defined [trailLength](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailLength).
   * During the course of the animation, the visible streamline will travel to reach the path length defined here, then
   * will restart. This value may be autocast with a string expressing size in points or pixels (e.g. `100px`).
   *
   * @default 200
   * @example
   * // width in points
   * flowRenderer.maxPathLength = 100;
   * @example
   * // width in pixels
   * flowRenderer.maxPathLength = "200px";
   * @example
   * // width in points
   * flowRenderer.maxPathLength = "100pt";
   */
  get maxPathLength(): number;
  set maxPathLength(value: number | string);
  /**
   * The front cap of the streamline. A round cap will only be applied if [trailWidth](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailWidth) is greater than `4px` or `3pt`.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > The `round` trail cap is not supported in 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
   *
   * @default "butt"
   * @since 4.24
   */
  accessor trailCap: "butt" | "round";
  /**
   * The approximate visible length of the streamline in points. The streamlines will appear shorter when the trailLength is a smaller number, since they will start to fade before they reach the full [maxPathLength](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#maxPathLength).
   *
   * |`trailLength = 20` | `trailLength = 100` | `trailLength = 250` |
   * |----------------|-----------------|---------------|
   * | ![trailLength 20](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/trailLength-20.gif) | ![trailLength 100](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/trailLength-100.gif) | ![trailLength 250](https://developers.arcgis.com/javascript/latest/assets/img/apiref/renderers/flow/trailLength-250.gif) |
   *
   * @default 100
   */
  accessor trailLength: number;
  /**
   * The width of the streamline trail in points. This value may be autocast with a string
   * expressing size in points or pixels (e.g. `3px`).
   *
   * @default 1.5
   * @example
   * // width in points
   * flowRenderer.trailWidth = 4;
   * @example
   * // width in pixels
   * flowRenderer.trailWidth = "2px";
   * @example
   * // width in points
   * flowRenderer.trailWidth = "4pt";
   */
  get trailWidth(): number;
  set trailWidth(value: number | string);
  /** The type of Renderer. */
  get type(): "flow";
  /**
   * An array of [VisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-VisualVariable.html) objects.
   * Each object must indicate
   * the type of visual variable to apply (e.g. [ColorVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html)), the numeric
   * field from which to drive the visualization, and the visual values to map to the data.
   * The following list identifies each visual variable type that is supported with the `FlowRenderer` and provides a link to the specification table
   * of each: [ColorVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html),
   * [OpacityVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html), and [SizeVisualVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
   * `SizeVisualVariable` will update the [trailWidth](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html#trailWidth) property.
   *
   * When setting fields for the visual variables set on the FlowRenderer, use the `Magnitude` field. `Magnitude` will return pixel values from the
   * first band. If the data represents u (zonal) and v (meridional) speed components, values are automatically converted
   * to `Magnitude` and `Direction`.
   *
   * @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
   * @example
   * const renderer = new FlowRenderer({
   *    visualVariables: [{
   *       type: "color",
   *       field: "Magnitude",
   *       stops: [
   *         { value: 3, color: "#0080ff" },
   *         { value: 15, color: "#00ff00" }
   *       ]
   *     }, {
   *       type: "opacity",
   *       field: "Magnitude",
   *       stops: [
   *         { value: 1, opacity: 0.5 },
   *         { value: 8, opacity: 1 }
   *       ]
   *    }]
   * });
   * @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
   */
  get visualVariables(): VisualVariable[] | null | undefined;
  set visualVariables(value: ((ColorVariableProperties & {
      type: "color";
  }) | (SizeVariableProperties & {
      type: "size";
  }) | (OpacityVariableProperties & {
      type: "opacity";
  }) | (RotationVariableProperties & {
      type: "rotation";
  }))[] | null | undefined);
  /**
   * Creates a deep clone of the renderer.
   *
   * @example
   * // Creates a deep clone of the first layer's renderer
   * let renderer = view.map.layers.at(0).renderer.clone();
   */
  clone(): FlowRenderer;
}
declare const FlowRendererSuperclass: typeof JSONSupport & typeof VisualVariablesMixin