import type { DateFacetValue, NumericFacetValue } from '@coveo/headless';
import type { FacetInfo, FacetStore, FacetType, FacetValueFormat } from '../facets/facet-common-store';
export declare const isRefineModalFacet = "is-refine-modal";
export type BaseStore<T> = CommonStore<T> & {
    getUniqueIDFromEngine(engine: unknown): string | undefined;
};
export interface ResultListInfo {
    focusOnNextNewResult(): void;
    focusOnFirstResultAfterNextSearch(): Promise<void>;
}
export declare function createAppLoadedListener(store: CommonStore<{
    loadingFlags: string[];
}>, callback: (isAppLoaded: boolean) => void): void;
export declare function createBaseStore<T extends {}>(initialState: T): BaseStore<T>;
export declare function registerFacet<T extends FacetType, U extends string>(store: CommonStore<Facets>, facetType: T, data: Facets[T][U] & {
    facetId: U;
    element: HTMLElement;
}): void;
export declare function setLoadingFlag(store: CommonStore<{
    loadingFlags: string[];
}>, loadingFlag: string): void;
export declare function unsetLoadingFlag(store: CommonStore<{
    loadingFlags: string[];
}>, loadingFlag: string): void;
export declare function getFacetElements(store: CommonStore<Facets>): HTMLElement[];
export declare function waitUntilAppLoaded(store: CommonStore<{
    loadingFlags: string[];
}>, callback: () => void): void;
interface CommonStore<StoreData> {
    state: StoreData;
    get: <PropName extends keyof StoreData>(propName: PropName) => StoreData[PropName];
    set: <PropName extends keyof StoreData>(propName: PropName, value: StoreData[PropName]) => void;
    onChange: <PropName extends keyof StoreData>(propName: PropName, cb: (newValue: StoreData[PropName]) => void) => () => void;
}
interface Facets {
    facets: FacetStore<FacetInfo>;
    numericFacets: FacetStore<FacetInfo & FacetValueFormat<NumericFacetValue>>;
    dateFacets: FacetStore<FacetInfo & FacetValueFormat<DateFacetValue>>;
    categoryFacets: FacetStore<FacetInfo>;
    facetElements: HTMLElement[];
}
export {};
