import type { CoreEngine } from '../../../app/engine.js'; import { type Controller } from '../../controller/headless-controller.js'; /** * The `SearchStatus` controller lets you access search status information. * * Example: [search-status.fn.tsx](https://github.com/coveo/ui-kit/blob/main/samples/headless/search-react/src/components/search-status/search-status.fn.tsx) * * @group Controllers * @category SearchStatus */ export interface SearchStatus extends Controller { /** * The state of the `SearchStatus` controller. */ state: SearchStatusState; } /** * A scoped and simplified part of the headless state that is relevant to the `SearchStatus` controller. * * @group Controllers * @category SearchStatus */ export interface SearchStatusState { /** * `true` if there is an error for the last executed query and `false` otherwise. */ hasError: boolean; /** * Determines if a search is in progress. */ isLoading: boolean; /** * Determines if there are results available for the last executed query. */ hasResults: boolean; /** * Determines if a first search has been executed. */ firstSearchExecuted: boolean; } /** * Creates a `SearchStatus` controller instance. * * @param engine - The headless engine. * @returns A `SearchStatus` controller instance. * */ export declare function buildCoreStatus(engine: CoreEngine): SearchStatus;