/**
 * `<tooltip-ui>` — Tooltip popup. Two modes — default `follows="trigger"` shows on hover/focus anchored to wrapped children; `follows="pointer"` subscribes to chart-hover events from [for] and renders a data-viz card that tracks the pointer.
 *
 * @see https://ui-kit.exe.xyz/site/components/tooltip
 *
 * Type declarations generated by scripts/build/dts-codegen.mjs from
 * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
 * run `npm run build:components`, then `npm run codegen:dts` to
 * regenerate; or hand-author this file fully if rich event types are
 * needed beyond what the yaml `events:` block can express.
 */

import { UIElement } from '../../core/element.js';

export class UITooltip extends UIElement {
  /** Delay in milliseconds before showing the tooltip on hover (trigger mode only). */
  delay: number;
  /** `trigger` (default) pins to wrapped children via hover/focus. `pointer` subscribes to chart-hover/chart-leave events from [for] and positions at the pointer coordinates — used by chart-ui / heatmap-ui. */
  follows: 'trigger' | 'pointer';
  /** id-ref of a chart-ui / heatmap-ui to follow. Required when follows=pointer. The target must dispatch `chart-hover` and `chart-leave` events. */
  for: string;
  /** Color swatch shown beside each value row in pointer mode. `none` omits the swatch. Swatch color reads `--tooltip-indicator-color` which the host injects per-row from `--color-{seriesKey}`. */
  indicator: 'none' | 'dot' | 'line' | 'dashed';
  /** Preferred position relative to the anchor element (trigger mode only). */
  placement: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
  /** Tooltip text content displayed in the overlay (trigger mode only). */
  text: string;
}
