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

/** @since 5.0 */
export interface OthersCategoryProperties extends Partial<Pick<OthersCategory, "label" | "threshold">> {
  /**
   * Defines the color used to represent all
   *   categories whose pie slices are smaller than the percentage
   *   defined by `threshold`. This is typically used to represent a generic "others"
   *   category where slices would otherwise be too small to read.
   *
   * @default [0, 0, 0, 0] - black, transparent
   * @since 5.0
   */
  color?: ColorLike;
}

/** @since 5.0 */
export default class OthersCategory extends OthersCategorySuperclass {
  constructor(properties?: OthersCategoryProperties);
  /**
   * Defines the color used to represent all
   *   categories whose pie slices are smaller than the percentage
   *   defined by `threshold`. This is typically used to represent a generic "others"
   *   category where slices would otherwise be too small to read.
   *
   * @default [0, 0, 0, 0] - black, transparent
   * @since 5.0
   */
  get color(): Color;
  set color(value: ColorLike);
  /**
   * Describes the [color](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-OthersCategory.html#color) grouping categories smaller than the [threshold](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-OthersCategory.html#threshold) in the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   *
   * @since 5.0
   * @example renderer.othersCategory.label = "All other categories";
   */
  accessor label: string | null | undefined;
  /**
   * Represents the minimum size of individual slices as a percentage (between 0 and 1) of the entire pie for a slice to belong to its own category. All slices that make up a smaller percentage than the `threshold` will automatically be aggregated to an "others" category represented by the [color](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-OthersCategory.html#color). For example, if the `threshold` is 0.05, then all slices that make up less than 5% of the total pie will be represented with the [color](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-support-OthersCategory.html#color).
   *
   * @default 0
   * @since 5.0
   * @example
   * // all slices smaller than 10% of the pie
   * // will aggregate to the "others" category
   * renderer.othersCategory.threshold = 0.1;
   */
  accessor threshold: number;
}
declare const OthersCategorySuperclass: typeof JSONSupport & typeof ClonableMixin