/**
 * useImpressionTracker — records `Search Impression` into the batched
 * impression buffer when the ref'd element first crosses the visibility
 * threshold (default 0.5).
 *
 * Phase 2b of the V4 analytics pivot (SCRUM-259). Replaces the per-card
 * `trackSearchImpression` emission with a `buffer.record()` call against
 * the `SearchImpressionBuffer` from `<BufferProvider>`. The buffer
 * accumulates entries within a debounce window and flushes ONE batched
 * `Search Impression` event with parallel arrays.
 *
 * The hook is a thin React shell: it owns the IntersectionObserver
 * registration via `observeOnce` (framework-agnostic), then records into
 * the buffer.
 *
 * Usage:
 *   const ref = useRef<HTMLDivElement>(null);
 *   useImpressionTracker(ref, {
 *     ctx, objectId: result.id, position: index + 1,
 *     surface: "results_page", searchId,
 *   });
 *   return <div ref={ref}>...</div>;
 *
 * If `ctx` is null/undefined (no SearchProvider in the tree yet, SSR
 * first paint) the hook is a no-op. If no `<BufferProvider>` is above,
 * the buffer hook returns a no-op shim — descendant cards still render
 * but no V4 emission happens.
 */
import type { RefObject } from "react";
import type { TrackContext } from "@seekora-ai/ui-sdk-core";
export interface UseImpressionTrackerProps {
    /** TrackContext from `useTrackContext()` (or supplied directly). */
    ctx: TrackContext | null | undefined;
    /** Stable identifier for the impressed object (typically `result.id`). */
    objectId: string;
    /** Object kind. Defaults to `"product"`. Threaded into `objectData.object_type`. */
    objectType?: string;
    /** 1-based position across the full result set (accounts for pagination). */
    position: number;
    /** Surface that produced the impression. */
    surface: "results_page" | "dropdown" | "recommendation_widget";
    /**
     * Search session id (search_id). Required for `Search Impression` —
     * without it the impression cannot be attributed to a query and the
     * record() call is a no-op.
     */
    searchId?: string;
    /**
     * Optional per-card `objectData` payload threaded into the batched
     * event's parallel `objectData[]` array.
     */
    objectData?: Record<string, unknown>;
}
export declare function useImpressionTracker(ref: RefObject<Element | null>, props: UseImpressionTrackerProps): void;
//# sourceMappingURL=useImpressionTracker.d.ts.map