import { BentoActiveRange, BentoItemPosition, BentoLayoutParams } from '../../../types/src/bento-grid';
import { GalleryItem } from '../../../types/src/gallery-item';

/**
 * Pure layout calculator for a bento grid.
 * Computes absolute pixel positions for items that can span multiple
 * columns and rows. Call `compute()` after data or layout config changes,
 * then `getActiveRange()` on every scroll event to know which items to render.
 */
export declare class BentoLayout {
    private _positions;
    /**
     * Sorted array of each item's `top` pixel value (index matches item index).
     * Non-strictly increasing (items in the same row share the same `top`).
     * Used for O(log N) binary search inside getActiveRange().
     */
    private _topPositions;
    private _scrollSize;
    /** Total scrollable height in pixels after the last compute() call. */
    get scrollSize(): number;
    /** Returns the pixel position for item at `idx`, or undefined if not yet computed. */
    getPosition(idx: number): BentoItemPosition | undefined;
    /**
     * Runs the bin-packing algorithm and populates pixel positions for all items.
     * Synchronous — completes in < 1 ms for typical datasets (≤ 10 000 items).
     */
    compute(items: GalleryItem[], params: BentoLayoutParams): void;
    /**
     * Returns the inclusive [first, last] item index range that overlaps the
     * visible window [scrollTop − overhang, scrollTop + viewportHeight + overhang].
     * O(log N) via binary search on the sorted _topPositions array.
     */
    getActiveRange(scrollTop: number, viewportHeight: number, overhang?: number): BentoActiveRange;
    /**
     * Returns the smallest index i such that _topPositions[i] >= value.
     * Returns n if all values are < value.
     */
    private lowerBound;
    /**
     * Returns the smallest index i such that _topPositions[i] > value.
     * Returns n if all values are <= value.
     */
    private upperBound;
}
