/**
 * Function for determining the suggested `minSize` and `maxSize` of a
 * [scale-dependent size visual variable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > This function is not intended for use in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
 *
 * @since 4.12
 */
import type { SizeRangeResult, SizeRangeParameters } from "./types.js";

/**
 * Generates a suggested size range (i.e. the `minSize` and `maxSize` size variables) for a
 * [scale-dependent size visual variable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html).
 *
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > This function is not intended for use in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
 *
 * @param parameters - See the table below for details about parameters that may be passed to this function.
 * @returns Resolves to an object containing the suggested `minSize` and `maxSize` by scale for the layer's renderer.
 * @example
 * sizeRange({
 *   layer: featureLayer,
 *   view: view
 * }).then(function(response){
 *
 *   // update the minSize and maxSize of a size visual variable
 *   // on a layer's renderer to be scale-dependent
 *   const renderer = featureLayer.renderer.clone();
 *   const sizeVariable = renderer.visualVariables.filter( vv => vv.type === "size")[0].clone();
 *   sizeVariable.minSize = response.minSize;
 *   sizeVariable.maxSize = response.maxSize;
 *
 *   renderer.visualVariables = [ sizeVariable ];
 *   featureLayer.renderer = renderer;
 * });
 */
export default function sizeRange(parameters: SizeRangeParameters): Promise<SizeRangeResult | null | undefined>;