import * as React from 'react';
import { type SxProps, type Theme } from '@mui/material/styles';
import { type PrependKeys } from '@mui/x-internals/types';
import { type ChartsLabelMarkProps } from "../ChartsLabel/ChartsLabelMark.js";
import { type Direction } from "./direction.js";
import { type PiecewiseColorLegendClasses } from "./piecewiseColorLegendClasses.js";
import { type ColorLegendSelector } from "./colorLegend.types.js";
import { type PiecewiseLabelFormatterParams } from "./piecewiseColorLegend.types.js";
import { type PiecewiseColorLegendItemContext } from "./legendContext.types.js";
export interface PiecewiseColorLegendProps extends ColorLegendSelector, PrependKeys<Pick<ChartsLabelMarkProps, 'type'>, 'mark'> {
  /**
   * The direction of the legend layout.
   * @default 'horizontal'
   */
  direction?: Direction;
  /**
   * Format the legend labels.
   * @param {PiecewiseLabelFormatterParams} params The bound of the piece to format.
   * @returns {string|null} The displayed label, `''` to skip the label but show the color mark, or `null` to skip it entirely.
   */
  labelFormatter?: (params: PiecewiseLabelFormatterParams) => string | null;
  /**
   * Where to position the labels relative to the color marks.
   * @default 'extremes'
   */
  labelPosition?: 'start' | 'end' | 'extremes' | 'inline-start' | 'inline-end';
  /**
   * Callback fired when a legend item is clicked.
   * @param {React.MouseEvent<HTMLButtonElement, MouseEvent>} event The click event.
   * @param {PiecewiseColorLegendItemContext} legendItem The legend item data.
   * @param {number} index The index of the clicked legend item.
   */
  onItemClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, legendItem: PiecewiseColorLegendItemContext, index: number) => void;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: Partial<PiecewiseColorLegendClasses>;
  className?: string;
  sx?: SxProps<Theme>;
  tabIndex?: number;
}
declare const PiecewiseColorLegend: React.ForwardRefExoticComponent<PiecewiseColorLegendProps & import("./chartsLegend.types.js").ChartsLegendSlotExtension & React.RefAttributes<{}>>;
export { PiecewiseColorLegend };