import { ControllerBase, type ControllerHost } from './Abstracts/ControllerBase'; /** * Represents the anchor state reported by the `IntersectionAnchorController`. * * @public */ export interface IIntersectionAnchorState { /** * Whether the top anchor is intersecting (content is scrolled to the top). */ isAtScrollTop: boolean; /** * Whether the bottom anchor is intersecting (content is scrolled to the bottom). */ isAtScrollBottom: boolean; /** * Whether the start anchor is intersecting (content is scrolled to the horizontal start). */ isAtScrollStart: boolean; /** * Whether the end anchor is intersecting (content is scrolled to the horizontal end). */ isAtScrollEnd: boolean; } /** * Represents the `IIntersectionAnchorControllerConfig` interface. * * @public */ export interface IIntersectionAnchorControllerConfig { config?: { rootMargin?: string; threshold?: number | Array; }; target?: Element | string; anchor?: { top?: Element | string; bottom?: Element | string; start?: Element | string; end?: Element | string; }; callback?: (anchor: IIntersectionAnchorState) => void; } /** * IntersectionAnchorController - This controller is used to observe the intersection of anchor * elements within a scrollable container. Supports all four directions: top, bottom, start, and end. * * @public */ export declare class IntersectionAnchorController extends ControllerBase { private readonly _observer; private readonly _anchorSelectors; private readonly _callback?; private _resolvedAnchors; constructor(host: ControllerHost, config: IIntersectionAnchorControllerConfig); /** * @public * @override */ hostConnected(): void; /** * @public * @override */ hostDisconnected(): void; /** * Disconnects the IntersectionObserver and clears resolved anchors. * * @protected */ protected disconnect(): void; /** * Handles intersection changes and maps them to the correct anchor direction. * * @param entries - The intersection observer entries. * @protected */ protected handleChanges(entries: Array): void; /** * Resolves and observes a specific anchor direction. * * @param direction - The anchor direction to observe. * @private */ private observeAnchor; private tryGetElement; } //# sourceMappingURL=IntersectionAnchorController.d.ts.map