import type { TimelineItem } from "../components/Timeline/Timeline";
export interface UseTimelineOptions {
    /** Controlled `items` — when set, the hook becomes a pass-through and
     *  every mutation fires `onChange` instead of mutating local state. */
    items?: TimelineItem[];
    /** Uncontrolled seed. Default `[]`. */
    defaultItems?: TimelineItem[];
    onChange?: (items: TimelineItem[]) => void;
}
export interface UseTimelineReturn {
    items: TimelineItem[];
    /** Append a single item to the end. Idempotent when the id already
     *  exists (no-op). */
    add: (item: TimelineItem) => void;
    /** Insert an item at a specific index (0 = top). Clamps to range. */
    insert: (index: number, item: TimelineItem) => void;
    /** Remove an item by id. No-op if not found. */
    remove: (id: string) => void;
    /** Patch a single item by id with the supplied fields. */
    update: (id: string, patch: Partial<Omit<TimelineItem, "id">>) => void;
    /** Replace the entire item list (e.g. after a server refresh). */
    set: (next: TimelineItem[]) => void;
    /** Clear all items. */
    clear: () => void;
    /** Ready-to-spread props for `<Timeline>`. */
    timelineProps: {
        items: TimelineItem[];
    };
}
export declare function useTimeline({ items: controlled, defaultItems, onChange, }?: UseTimelineOptions): UseTimelineReturn;
//# sourceMappingURL=useTimeline.d.ts.map