import type { Relay } from '@coveo/relay';
import { type Logger } from 'pino';
import { type Mock } from 'vitest';
import type { CaseAssistEngine } from '../app/case-assist-engine/case-assist-engine.js';
import type { CommerceEngine } from '../app/commerce-engine/commerce-engine.js';
import type { SSRCommerceEngine } from '../app/commerce-ssr-engine/factories/build-factory.js';
import type { CoreEngine, CoreEngineNext } from '../app/engine.js';
import type { InsightEngine } from '../app/insight-engine/insight-engine.js';
import type { RecommendationEngine } from '../app/recommendation-engine/recommendation-engine.js';
import type { SearchEngine } from '../app/search-engine/search-engine.js';
import type { SSRSearchEngine } from '../app/search-engine/search-engine.ssr.js';
import { stateKey } from '../app/state-key.js';
type SpyEverything<T> = {
    [K in keyof T]: T[K] extends (...args: infer A) => infer R ? Mock<(...args: A) => R> : T[K] extends object ? SpyEverything<T[K]> : T[K];
};
type SpiedLoggerProps = SpyEverything<Pick<Logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>>;
type MockedLogger = Logger & SpiedLoggerProps;
type MockedRelay = Relay & Pick<Relay, 'emit'>;
export declare function mockRelay(): MockedRelay;
type MockedCoreEngine<State extends StateFromEngine<CoreEngine> = StateFromEngine<CoreEngine>> = CoreEngine & {
    state: State;
    logger: MockedLogger;
    relay: MockedRelay;
} & SpyEverything<Omit<CoreEngine, 'logger' | 'state' | 'relay'>>;
export declare function buildMockCoreEngine<State extends StateFromEngine<CoreEngine>>(initialState: State): MockedCoreEngine<State>;
type MockedCoreEngineNext<State extends StateFromEngineNext<CoreEngineNext> = StateFromEngineNext<CoreEngineNext>> = CoreEngineNext & {
    [stateKey]: State;
    logger: MockedLogger;
    relay: MockedRelay;
} & SpyEverything<Omit<CoreEngineNext, 'logger' | 'stateKey' | 'relay'>>;
export declare function buildMockCoreEngineNext<State extends StateFromEngineNext<CoreEngineNext>>(initialState: State): MockedCoreEngineNext<State>;
export type MockedSearchEngine = SearchEngine & MockedCoreEngine<StateFromEngine<SearchEngine>> & SpyEverything<Pick<SearchEngine, 'executeFirstSearch' | 'executeFirstSearchAfterStandaloneSearchBoxRedirect'>>;
export type MockedCaseAssistEngine = CaseAssistEngine;
export type MockedRecommendationEngine = RecommendationEngine;
export type MockedCommerceEngine = CommerceEngine;
export type MockedInsightEngine = InsightEngine;
type StateFromEngine<TEngine extends CoreEngine> = TEngine['state'];
type StateFromEngineNext<TEngine extends CoreEngineNext> = TEngine[typeof stateKey];
export declare function buildMockSearchEngine(initialState: StateFromEngine<SearchEngine>): MockedSearchEngine;
export declare function buildMockCaseAssistEngine<State extends StateFromEngine<CaseAssistEngine>>(initialState: State): CaseAssistEngine;
export declare function buildMockCommerceEngine<State extends StateFromEngineNext<CommerceEngine>>(initialState: State): CommerceEngine;
export declare function buildMockInsightEngine<State extends StateFromEngine<InsightEngine>>(initialState: State): InsightEngine;
export declare function buildMockRecommendationEngine<State extends StateFromEngine<RecommendationEngine>>(initialState: State): RecommendationEngine;
export declare function buildMockSSRSearchEngine(initialState: StateFromEngine<SearchEngine>): SSRSearchEngine;
export declare function buildMockSSRCommerceEngine(initialState: StateFromEngineNext<CommerceEngine>): SSRCommerceEngine;
export {};
