import type { Controller } from '../../controllers/controller/headless-controller.js';
import { LegacySearchAction } from '../../features/analytics/analytics-utils.js';
import { ControllerDefinitionsMap } from '../ssr-engine/types/common.js';
import { EngineDefinition, EngineDefinitionOptions } from '../ssr-engine/types/core-engine.js';
import { SearchEngine, SearchEngineOptions } from './search-engine.js';
/**
 * The SSR search engine.
 *
 * @group Engine
 */
export interface SSRSearchEngine extends SearchEngine {
    /**
     * Waits for the search to be completed and returns a promise that resolves to a `SearchCompletedAction`.
     */
    waitForSearchCompletedAction(): Promise<SearchCompletedAction>;
}
/**
 * The options to create a search engine definition in SSR.
 *
 * @group Engine
 */
export type SearchEngineDefinitionOptions<TControllers extends ControllerDefinitionsMap<SSRSearchEngine, Controller>> = EngineDefinitionOptions<SearchEngineOptions, TControllers>;
export type SearchCompletedAction = ReturnType<LegacySearchAction['fulfilled' | 'rejected']>;
export interface SearchEngineDefinition<TControllers extends ControllerDefinitionsMap<SSRSearchEngine, Controller>> extends EngineDefinition<SSRSearchEngine, TControllers, SearchEngineOptions> {
}
/**
 * Initializes a Search engine definition in SSR with given controllers definitions and search engine config.
 *
 * @param options - The search engine definition
 * @returns Three utility functions to fetch the initial state of the engine in SSR, hydrate the state in CSR,
 *  and a build function that can be used for edge cases requiring more control.
 *
 * @group Engine
 */
export declare function defineSearchEngine<TControllerDefinitions extends ControllerDefinitionsMap<SearchEngine, Controller>>(options: SearchEngineDefinitionOptions<TControllerDefinitions>): SearchEngineDefinition<TControllerDefinitions>;
