import type { AsyncThunkAction, PayloadAction } from '@reduxjs/toolkit'; import type { HtmlRequestOptions } from '../../api/search/html/html-request.js'; import type { CoreEngine } from '../../app/engine.js'; import { type AsyncThunkGlobalOptions, type FetchResultContentThunkReturn, type PreparePreviewPaginationActionPayload, type UpdateContentURLOptions, type UpdateContentURLThunkReturn } from './result-preview-actions.js'; import type { StateNeededByHtmlEndpoint } from './result-preview-request-builder.js'; /** * The result preview action creators. * * @group Actions * @category ResultPreview */ export interface ResultPreviewActionCreators { /** * Fetch the content of a preview * @param opts * @returns A dispatchable action. */ fetchResultContent(opts: HtmlRequestOptions): AsyncThunkAction>; /** * Compute and update the content URL for the result preview * @param opts * @returns A dispatchable action. */ updateContentURL(opts: UpdateContentURLOptions): AsyncThunkAction>; /** * Update the position of the current result preview for pagination purposes. * @returns A dispatchable action. */ nextPreview(): PayloadAction; /** * Update the position of the current result preview for pagination purposes. * @returns A dispatchable action. */ previousPreview(): PayloadAction; preparePreviewPagination(payload: PreparePreviewPaginationActionPayload): PayloadAction; } /** * Loads the `recommendation` reducer and returns possible action creators. * * @param engine - The headless engine. * @returns An object holding the action creators. * * @group Actions * @category ResultPreview */ export declare function loadResultPreviewActions(engine: CoreEngine): ResultPreviewActionCreators;