import type { CoreEngine } from '../../../app/engine.js';
import type { ErrorPayload } from '../../controller/error-payload.js';
import { type Controller } from '../../controller/headless-controller.js';
/**
 * The `QueryError` controller allows to retrieve information about the current error returned by the search API, if any.
 *
 * Example: [query-error.fn.tsx](https://github.com/coveo/ui-kit/blob/main/packages/samples/headless-react/src/components/query-error/query-error.fn.tsx)
 *
 * @group Controllers
 * @category QueryError
 */
export interface QueryError extends Controller {
    /**
     * The state of the `QueryError` controller.
     */
    state: QueryErrorState;
}
/**
 * A scoped and simplified part of the headless state that is relevant to the `QueryError` controller.
 *
 * @group Controllers
 * @category QueryError
 */
export interface QueryErrorState {
    /**
     * `true` if there is an error for the last executed query and `false` otherwise.
     */
    hasError: boolean;
    /**
     * The current error for the last executed query, or `null` if none is present.
     */
    error: ErrorPayload | null;
}
export declare function buildCoreQueryError(engine: CoreEngine): QueryError;
