import { type FC, type ReactNode } from 'react'; import { type LineChartZoomRange } from './LineChartContext'; export interface LineChartZoomBrushProps { /** When `true` the zoom interaction is removed entirely. */ disabled?: boolean; /** Override the default range text rendered inside the popover. */ formatRange?: (range: LineChartZoomRange) => ReactNode; /** Override the default "Zoom in" label on the confirm button. */ confirmLabel?: ReactNode; /** * Portal target for the floating range/confirm popover. Defaults to * `document.body`. Pass a dialog/modal node to keep the popover inside the * focus-trapped subtree — without this the portal escapes the focus context * and tabbing from the confirm button lands outside the dialog. */ container?: HTMLElement | null; } /** * Enables Chrome DevTools-style drag-to-zoom on the chart plot. Two-phase: * * 1. The user drags on the plot → gray `` follows the cursor, * and a floating popover shows the formatted range live. * 2. The user releases → selection stays put, popover surfaces a "Zoom in" * button. Clicking it (or pressing Enter) fires `onZoomChange` with the * selected range. Escape, clicking outside the popover, or starting a new * drag dismisses without emitting. * * Mount once as a child of `` (anywhere — order does not matter * since recharts picks `` up by component type). Pair with a * "Zoom out" affordance in your chart header that calls `setRange(null)`. */ export declare const LineChartZoomBrush: FC;