import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";

export interface ExpressionInfoProperties extends Partial<Pick<ExpressionInfo, "expression" | "returnType" | "title">> {}

/**
 * The `ExpressionInfo` class references an [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression following
 * the specification defined by the [Arcade Visualization Profile](https://developers.arcgis.com/javascript/latest/arcade/#visualization).
 * Expressions must return a string or a number and may access data values from the feature
 * with the `$feature` profile variable.
 *
 * This expression is used for defining an [AggregateField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/)
 * for use in a [FeatureReductionBinning](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/) or a
 * [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) renderer, popup, or label. It is executed
 * once defined inside a layer's [FeatureLayer.featureReduction](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#featureReduction) property.
 *
 * @since 4.25
 * @see [Arcade Visualization Profile](https://developers.arcgis.com/javascript/latest/arcade/#visualization)
 * @see [AggregateField.onStatisticExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/#onStatisticExpression)
 * @example
 * const expressionInfo = new ExpressionInfo({
 *   title: "Population per square kilometer",
 *   returnType: "number",
 *   expression: "$feature.population / AreaGeodetic($feature, 'square-kilometers')"
 * });
 */
export default class ExpressionInfo extends ExpressionInfoSuperclass {
  constructor(properties?: ExpressionInfoProperties);
  /**
   * An [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression following
   * the specification defined by the [Arcade Visualization Profile](https://developers.arcgis.com/javascript/latest/arcade/#visualization).
   * Expressions must return a string or a number and may access data values from the feature
   * with the `$feature` profile variable.
   *
   * @see [Arcade Visualization Profile](https://developers.arcgis.com/javascript/latest/arcade/#visualization)
   * @example
   * // Calculates the percentage of the population that is Asian
   * expressionInfo.expression = "($feature.Asian / $feature.TOT_POP) * 100";
   */
  accessor expression: string;
  /** Indicates the return type of the Arcade expression. */
  accessor returnType: "number" | "string";
  /**
   * The title used to describe the value returned by the expression.
   *
   * @example expressionInfo.title = "Percent Asian";
   */
  accessor title: string | null | undefined;
}
declare const ExpressionInfoSuperclass: typeof JSONSupport & typeof ClonableMixin