/**
 * Function for generating statistics for the age of features in a layer based on a given start time and end time.
 *
 * @since 4.13
 * @see [colorRendererCreator.createAgeRenderer](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/renderers/color/#createAgeRenderer)
 * @see [sizeRendererCreator.createAgeRenderer](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/renderers/size/#createAgeRenderer)
 */
import type { SummaryStatisticsForAgeParameters, SummaryStatisticsResult } from "./types.js";

/**
 * Returns an object containing various statistics describing an age value (e.g.
 * the difference between a given end time from a start time) in a [Layer](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/).
 *
 * @param parameters - The function parameters.
 * @returns Returns a promise that resolves to [SummaryStatisticsResult](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/statistics/types/#SummaryStatisticsResult).
 * @example
 * summaryStatisticsForAge({
 *   layer: featureLayer,
 *   startTime: "Created_Date",
 *   endTime: Date.now(),
 *   unit: "days",
 *   view: mapView
 * }).then(function(stats){
 *   console.log(`Average age of open incidents in days: ${stats.avg}`);
 * });
 */
export default function summaryStatisticsForAge(parameters: SummaryStatisticsForAgeParameters): Promise<SummaryStatisticsResult>;