import { type UseStateInitializer } from "../types.js";
import { type IntersectionObserverRootMargin, type IntersectionObserverThreshold } from "../useIntersectionObserver.js";
/**
 * @since 6.0.0
 */
export interface HeadingReference {
    id: string;
}
/**
 * @since 6.0.0
 */
export interface HeadingReferenceWithChildren extends HeadingReference {
    children?: readonly HeadingReferenceWithChildren[];
}
/**
 * @defaultValue `[0.0, 1.0]`
 * @since 6.0.0
 */
export declare const DEFAULT_ACTIVE_HEADING_THRESHOLD: IntersectionObserverThreshold;
/**
 * ```tsx
 * const headerHeightVar = window
 *   .getComputedStyle(document.documentElement)
 *   .getPropertyValue("--rmd-layout-header-height");
 * const headerHeight = parseCssLengthUnit({
 *   value: headerHeightVar || "3.5rem",
 * });

 * return `-${headerHeight}px 0px 0px 0px`;
 * ```
 * @since 6.0.0
 */
export declare const DEFAULT_ACTIVE_HEADING_GET_ROOT_MARGIN: () => string;
/**
 * @since 6.0.0
 */
export interface ActiveHeadingIdOptions {
    headings: readonly HeadingReferenceWithChildren[];
    /** @see {@link DEFAULT_ACTIVE_HEADING_THRESHOLD} */
    threshold?: IntersectionObserverThreshold;
    /** @see {@link DEFAULT_ACTIVE_HEADING_GET_ROOT_MARGIN} */
    getRootMargin?(): IntersectionObserverRootMargin;
    /** @defaultValue `headings[0]?.id ?? ""` */
    defaultActiveId?: UseStateInitializer<string>;
    /** @defaultValue `0.8` */
    scrollBottomThreshold?: number;
}
/**
 * This is heavily inspired by:
 * @see https://github.com/mdn/yari/blob/231d6aab8f1c8efe159d268c261446c5b7ae12d9/client/src/document/hooks.ts#L171
 *
 * @since 6.0.0
 */
export declare function useActiveHeadingId(options: ActiveHeadingIdOptions): string;
