import type { GeneratedAnswerCitation } from '../../api/generated-answer/generated-answer-event-payload.js';
import type { AnswerApiQueryParams } from '../../features/generated-answer/generated-answer-request.js';
import type { GeneratedContentFormat, GeneratedResponseFormat } from './generated-response-format.js';
type GenerationStepStatus = 'active' | 'completed';
export type GenerationStepName = (typeof GENERATION_STEP_NAMES)[number];
export declare const GENERATION_STEP_NAMES: readonly ["searching", "thinking", "answering"];
export declare function normalizeGenerationStepName(name: string): GenerationStepName;
export interface GenerationStep {
    name: GenerationStepName;
    status: GenerationStepStatus;
    startedAt: number;
    finishedAt?: number;
}
/**
 * Base interface for generated answer structures.
 * Contains core properties shared across different generated answer implementations.
 */
export interface GeneratedAnswerBase {
    /** The unique identifier of the answer returned by the backend. */
    answerId?: string;
    /**
     * Determines if the generated answer is loading.
     */
    isLoading: boolean;
    /**
     * Determines if the generated answer is streaming.
     */
    isStreaming: boolean;
    /**
     * The generated answer.
     */
    answer?: string;
    /**
     * The content format of the generated answer. Possible values are:
     * - `text/plain`
     * - `text/markdown`
     */
    answerContentFormat?: GeneratedContentFormat;
    /**
     * The document snippets retrieved to generate the answer.
     */
    citations: GeneratedAnswerCitation[];
    /**
     * The generated answer error.
     */
    error?: {
        message?: string;
        code?: number;
        isRetryable?: boolean;
        isMaxDurationExceededError?(): boolean;
        isFollowupNotSupportedError?(): boolean;
        isConversationNotFoundError?(): boolean;
        isSseModelNotAvailableError?(): boolean;
        isSseInternalError?(): boolean;
        isSseTurnLimitReachedError?(): boolean;
    };
    /**
     * Whether an answer cannot be generated after a query is executed.
     */
    cannotAnswer: boolean;
    /**
     * Determines if the generated answer is liked, or upvoted by the end user.
     */
    liked: boolean;
    /**
     * Determines if the generated answer is disliked, or downvoted by the end user.
     */
    disliked: boolean;
    /**
     * Determines if the generated answer feedback was submitted.
     */
    feedbackSubmitted: boolean;
    /**
     * The list of steps involved in generating the answer, along with their status and timestamps.
     */
    generationSteps: GenerationStep[];
}
/**
 * A scoped and simplified part of the headless state that is relevant to the `GeneratedAnswer` component.
 *
 * @group Controllers
 * @category GeneratedAnswer
 */
export interface GeneratedAnswerState extends GeneratedAnswerBase {
    id: string;
    /**
     * Determines if the generated answer is visible.
     */
    isVisible: boolean;
    /**
     * Determines if the generated answer is enabled.
     */
    isEnabled: boolean;
    /**
     * The desired format options for the generated answer.
     */
    responseFormat: GeneratedResponseFormat;
    /**
     * Determines if the feedback modal is currently opened.
     */
    feedbackModalOpen: boolean;
    /**
     * A list of indexed fields to include in the citations returned with the generated answer.
     */
    fieldsToIncludeInCitations: string[];
    /**
     * Whether the answer is expanded.
     */
    expanded: boolean;
    /**
     * The answer configuration unique identifier.
     */
    answerConfigurationId?: string;
    /**
     * The query parameters used for the answer API request cache key
     */
    answerApiQueryParams?: AnswerApiQueryParams;
    /** The current mode of answer generation. */
    answerGenerationMode: 'automatic' | 'manual';
    /**
     * Determines if the answer is generated.
     */
    isAnswerGenerated: boolean;
}
export declare function getGeneratedAnswerInitialState(): GeneratedAnswerState;
export {};
