import type { HTMLAttributes } from 'react';
export interface SplitterOptions {
/** The committed width. Keep it in `useState`, or in `usePersistedState` to remember it. */
width: number;
/** Hears the width once a drag ends, and on each key press. */
onWidthChange: (width: number) => void;
min: number;
/** The widest it goes; a function for a bound that moves with the window. */
max: number | (() => number);
/** The panel edge the handle sits on. Dragging away from the panel widens it. */
side: 'left' | 'right';
/** What a double-click restores. */
defaultWidth?: number | undefined;
/** Names the handle when "Resize panel" doesn't say which panel. */
label?: string | undefined;
}
export interface Splitter {
/** The width to draw: the live one during a drag, the committed one otherwise. */
width: number;
resizing: boolean;
/** Spread on the handle: a focusable window splitter on the panel's edge. */
separatorProps: HTMLAttributes;
}
/** A panel edge that a drag, the arrow keys, Home and End resize. The width is
* the caller's state; a drag commits it once, when it ends. */
export declare function useSplitter({ width, onWidthChange, min, max, side, defaultWidth, label, }: SplitterOptions): Splitter;