/**
 * useFilterImpressionTracker — records `Filter Viewed` (V4 event 12) when a
 * facet GROUP container first crosses the visibility threshold.
 *
 * Sibling of `useImpressionTracker` (which fires `Search Impression` for
 * result cards). Where that hook tracks ONE element via a `RefObject`, a
 * facet panel renders MANY groups in a `.map(...)` — and you can't call a
 * fixed-arity hook once per dynamic group. So this hook owns a registry of
 * group containers keyed by `filter_attribute` and returns a ref-callback
 * factory `registerGroupRef(filter_attribute)` that `<Facets>` attaches to
 * each group's root element.
 *
 * Each registered element is observed exactly once via the framework-agnostic
 * `buildFilterImpressionEffect` builder (IntersectionObserver under the hood).
 * On first viewport entry it calls `trackFilterViewed(ctx, {filter_attribute,
 * surface, search_id})`. The builder's `observeOnce` guarantees one emission
 * per element, then disconnects. Observers are torn down on unmount.
 *
 * `search_id` is intentionally omitted — matching `SearchStateManager.
 * emitFacetApplied`, which leaves it out so the producer-side resolver picks
 * up the active search. This keeps `Filter Viewed` and `Facet Applied`
 * attributed to the SAME search session server-side via the shared resolver
 * chain (in-memory -> sessionStorage -> URL `?seekora_sid`).
 *
 * No-op safety: when `ctx` is null/undefined (no `trackContext` on
 * SearchProvider, SSR first paint, standalone UMD mount) the registered
 * ref-callbacks are inert — they never wire an observer and never emit. Same
 * bail-out contract as `useImpressionTracker`.
 *
 * Usage (inside <Facets>):
 *   const registerGroupRef = useFilterImpressionTracker({
 *     ctx: useTrackContext(),
 *     surface: "results_page",
 *   });
 *   // per group:
 *   <div ref={registerGroupRef(facet.field)}>...</div>
 *
 * SCRUM-259 Phase 4c — wires the highest-seam "Filter Viewed" producer that
 * shipped with `buildFilterImpressionEffect` but was never consumed.
 */
import { type TrackContext, type BuildFilterImpressionEffectOptions } from "@seekora-ai/ui-sdk-core";
/** Surface that produced the filter impression. Mirrors the builder payload. */
export type FilterImpressionSurface = "results_page" | "dropdown" | "recommendation_widget" | "outside_search";
export interface UseFilterImpressionTrackerProps {
    /** TrackContext from `useTrackContext()`. No-op when null/undefined. */
    ctx: TrackContext | null | undefined;
    /**
     * Surface that produced the impression. "results_page" for the standard
     * SRP facet panel.
     */
    surface: FilterImpressionSurface;
    /**
     * Optional injection of the tracker function — production callers leave
     * this undefined and the search-sdk export is used (threaded into the
     * builder). Tests inject a `vi.fn()` to assert the call shape without
     * mocking the whole search-sdk module.
     */
    tracker?: BuildFilterImpressionEffectOptions["tracker"];
}
/**
 * Ref-callback factory. Returns a React ref callback bound to a specific
 * `filter_attribute`; attach the returned callback to that facet group's
 * root element.
 */
export type RegisterGroupRef = (filterAttribute: string) => (el: Element | null) => void;
export declare function useFilterImpressionTracker(props: UseFilterImpressionTrackerProps): RegisterGroupRef;
//# sourceMappingURL=useFilterImpressionTracker.d.ts.map