/**
 * className suffix mapping for legend elements
 * Used to generate prefixed classNames, e.g., classNamePrefix='g2-' generates 'g2-legend-{suffix}'
 *
 * @example
 * import { CLASSNAME_SUFFIX_MAP, getLegendClassName } from './utils';
 *
 * const titleClassName = getLegendClassName(
 *   CLASS_NAMES.text.name,
 *   CLASSNAME_SUFFIX_MAP.title,
 *   'g2-'
 * );
 * // Returns: 'title-text g2-legend-title'
 */
export const CLASSNAME_SUFFIX_MAP = {
  // Common elements
  title: 'title',

  // Category legend elements
  item: 'item',
  marker: 'marker',
  label: 'label',
  value: 'value',
  focusIcon: 'focus-icon',
  background: 'background',

  // Continuous legend elements
  ribbon: 'ribbon',
  track: 'track',
  selection: 'selection',
  handle: 'handle',
  handleMarker: 'handle-marker',
  handleLabel: 'handle-label',
  indicator: 'indicator',

  // Navigator elements (reserved)
  prevBtn: 'prev-btn',
  nextBtn: 'next-btn',
  pageInfo: 'page-info',
} as const;

/**
 * className suffix type
 */
export type ClassNameSuffix = keyof typeof CLASSNAME_SUFFIX_MAP;
