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

export interface AttributeBinsGroupingProperties extends JSONSupportMixinProperties, ClonableMixinProperties, Partial<Pick<AttributeBinsGrouping, "alias" | "type" | "value" | "valueType">> {}

export type AttributeBinsGroupingType = "integer" | "string";

/**
 * AttributeBinsGrouping is a class that defines the `stackBy` or `splitBy` parameter in the [AttributeBinsQuery#binParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsQuery.html#binParameters).
 *
 * @since 4.32
 * @see [AttributeBinsQuery](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsQuery.html)
 * @see [Sample - Attribute Bins Query](https://developers.arcgis.com/javascript/latest/sample-code/query-attribute-bins/)
 */
export default class AttributeBinsGrouping extends AttributeBinsGroupingSuperclass {
  constructor(properties?: AttributeBinsGroupingProperties);
  /**
   * The alias is the name assigned to the attribute bin. It is required when the type is set to "expression" to provide a custom label
   * for the bin based on the expression.
   */
  accessor alias: string | null | undefined;
  /**
   * The type specifies how bin series will be created, indicating whether the bin grouping is based on a field, or an expression.
   * When the type is set to `expression`, the [valueType](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsGrouping.html#valueType) property is required.
   */
  accessor type: "field" | "expression";
  /** The name of the field or an expression used when the bins are split or stacked. */
  accessor value: string;
  /**
   * Specifies the expected data type of the output from the `stackBy` or `splitBy` parameters.
   * This property is required when the [type](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsGrouping.html#type) is set to `expression`.
   */
  valueType?: AttributeBinsGroupingType | null;
}
declare const AttributeBinsGroupingSuperclass: typeof JSONSupport & typeof ClonableMixin