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

export interface OthersCategoryProperties extends JSONSupportMixinProperties, ClonableMixinProperties, 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
   */
  color?: ColorLike;
}

export default abstract class OthersCategory extends OthersCategorySuperclass {
  /**
   * 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
   */
  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/).
   *
   * @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
   * @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