import * as React from 'react';
import { RefObject } from 'react';

/** Extension of shadcn's `Table` registry component: exposes `containerClassName` so callers can
 * override the wrapping `<div>`'s default `overflow-auto`. We need this for sticky-header support
 * (sticky uses the nearest overflow ancestor as its containing block — when the actual scroll
 * container is one level out, the inner overflow-auto needs to be neutralised with
 * `overflow-visible` so sticky aligns with the real scrolling parent). */
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & {
    containerClassName?: string;
} & React.RefAttributes<HTMLTableElement>>;
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;

/**
 * Tracks whether a scroll container has scrolled past its top edge, for sticky-header shadow effects.
 *
 * Returns `targetRef` (attach to the scroll container itself or any element inside it) and
 * `isScrolled` (true once the container's `scrollTop > 0`). On mount the hook walks up the DOM
 * from the target to find the nearest overflow ancestor (or uses the target itself if it already
 * has `overflowY: auto | scroll`), then listens to its `scroll` event.
 *
 * Used to surface a subtle "scroll lift" shadow under sticky headers so users know there is
 * content hidden above.
 *
 * **Why a scroll listener and not a sentinel + IntersectionObserver:** an earlier version used a
 * 1px sentinel as the first child of the scroll container. The sentinel's height pushed the thead
 * down by one pixel in normal flow, and as soon as the user scrolled the thead snapped up to its
 * sticky position — a visible 1px jitter. A scroll listener has no layout footprint.
 *
 * `passive: true` so the listener doesn't block native scroll smoothness; we never call
 * `preventDefault`.
 */
declare function useScrollShadow(): {
    targetRef: RefObject<HTMLDivElement | null>;
    isScrolled: boolean;
};

export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useScrollShadow };
