import { BackgroundColorsTokenType } from '../../../types/design-token.type';
import { ChartPosition } from '../../../types/vega-chart';
import { BaseDrawer } from './base-drawer';
export declare type LegendInputType = {
  data: string[];
  colors?: BackgroundColorsTokenType[];
  position?: ChartPosition;
  width: number;
  height: number;
};
/** The LegendDrawer class draws circles and text for each legend in a chart. */
export declare class LegendDrawer extends BaseDrawer<LegendInputType> {
  private pieLegendHoverGenerator;
  /**
   * This function adds interaction support to a chart by registering it with an interactor and providing a hover generator.
   *
   * @param {(SVGGElement | HTMLCanvasElement)[]} drawPiece - `drawPiece` is a parameter of type array
   * that contains either `SVGGElement` or `HTMLCanvasElement` elements. It is used as a callback
   * function to draw the legend items on the chart.
   */
  protected addInteractionSupport(drawPiece: (SVGGElement | HTMLCanvasElement)[]): void;
  /**
   * This function draws a legend on a chart using input options.
   *
   * @returns {(SVGGElement | HTMLCanvasElement)[] | undefined}  draw piece
   */
  protected draw(): (SVGGElement | HTMLCanvasElement)[] | undefined;
  /**
   * This function takes in an array of strings and an optional position parameter, and returns an object containing legend options for a chart.
   *
   * @param {string[]} data - an array of strings representing the legend labels
   * @param {BackgroundColorsTokenType[]} [colors] - bg color token array
   * @param {ChartPosition} [position] - The `position` parameter is an optional parameter of type
   * `ChartPosition` which specifies the x and y coordinates of the chart legend on the chart. If it is
   * not provided, the default position is `{x: 10, y: 0}`.
   * @returns {ChartLegendOptions | undefined} an object of type `ChartLegendOptions`.
   */
  private getChartLegendOptions;
  /**
   * This function calculates the position of a legend on a chart based on its index and the chart layout.
   *
   * @param {ChartPosition} position - The initial position of the legend on the chart, with x and y coordinates.
   * @param {number} index - The index parameter is a number that represents the index of the legend item in the array of legends. It is used to calculate the position of the legend item on the chart.
   * @param {number} longestTextLength - text length
   * @param {number} width - chart width
   * @returns {ChartPosition} an object of type `ChartPosition` with `x` and `y` properties.
   */
  private getLegendPosition;
}
