import { default as React } from 'react';
import { AICFOChatSubmissionSource } from '@zeniai/client-analytics';
import { AiCfoAnswerResponseType, ChatSession, ID, ResponseBlockType, User, CardPolicyChipFieldValue, CardPolicyFormDraft, CardsCreationInitialData, CardsFormDraft } from '@zeniai/client-epic-state';
import { MarkdownPatternType } from '../../../common/regex';
import { CardPolicyDocumentUploadState } from '../../spendManagement/cardPolicy/UploadPolicyDocumentControls';
import { PolicyLimitsToggleStepRowConfig } from './interactiveForm/PolicyLimitsToggleStep';
export interface AiCfoAnswerProps {
    aiCfoAnswerResponseType: AiCfoAnswerResponseType;
    chainOfThoughtActionSteps: string[];
    enableTypingEffect: boolean;
    isAnalyzing: boolean;
    isError: boolean;
    isFullView: boolean;
    isGenerating: boolean;
    questionId: ID;
    questionText: string;
    showOnlyText: boolean;
    tableDownloadEndPoint: string;
    aiStarAnimationEnabled?: boolean;
    /**
     * Tenant-wide users surfaced for interactive form variants that need an
     * owner picker (today: AI Card Creation). Optional so the prop is harmless
     * for non-interactive-form answers.
     */
    allUsers?: User[];
    analysisResponseTitle?: string;
    /**
     * Optional pre-loaded category search options for the AI Card Policy
     * form Step 2 search dropdown. Defaults to whatever the payload ships.
     */
    cardPolicyCategorySearchOptions?: CardPolicyChipFieldValue[];
    /** Inline error message rendered when the extract call fails. */
    cardPolicyDocumentUploadErrorMessage?: string;
    /**
     * Lifecycle of the in-flight policy-document extract request. Drives
     * the AI Card Policy `upload` Step 1 upload pill. Only meaningful
     * when the draft's `policyKind === "upload"`.
     */
    cardPolicyDocumentUploadState?: CardPolicyDocumentUploadState;
    /**
     * Live `aiCardPolicyFormDraft` selector value from CES. Threaded down to
     * the card-policy `<FormProvider>` so RHF can re-hydrate when the reducer
     * re-derives the draft (review chip diffs → source slices → re-derived
     * review rows, upload `wizardPlan` patches, extraction prefill).
     */
    cardPolicyFormDraft?: CardPolicyFormDraft;
    /**
     * `true` while a `fetchCardPolicyVendorOptions` request is in flight.
     * Drives the vendor search dropdown's spinner row.
     */
    cardPolicyIsVendorSearchLoading?: boolean;
    /**
     * Optional row config for the AI Card Policy form Step 4 toggleable
     * limits (label / helper / placeholder). Defaults shipped from the
     * wrapper cover Transaction Limit + Require Receipt; pass to override.
     */
    cardPolicyLimitRowsConfig?: PolicyLimitsToggleStepRowConfig[];
    /** Display name shown in the "policy.pdf ×" success pill. */
    cardPolicyUploadedFileName?: string;
    /**
     * Optional pre-loaded vendor search options for the AI Card Policy
     * form Step 1 search dropdown. Defaults to whatever the payload ships.
     */
    cardPolicyVendorSearchOptions?: CardPolicyChipFieldValue[];
    /**
     * Live `aiCardCreationFormDraft` selector value from CES. Threaded down to
     * the cards-creation `<FormProvider>` so RHF can re-hydrate when the
     * reducer re-derives the draft (step1 → step2 row materialization).
     */
    cardsCreationFormDraft?: CardsFormDraft;
    /** Credit-account cap for AI card-creation limit fields. */
    cardsCreationMaxLimitAmount?: number;
    currentChatSession?: ChatSession;
    /** True while the create-cards mutation is in flight. */
    isInteractiveFormSubmitting?: boolean;
    response?: ResponseBlockType;
    skipMarkdownPatterns?: MarkdownPatternType[];
    style?: React.CSSProperties;
    /**
     * When `true`, the follow-up questions block below the answer is not
     * rendered. The caller is responsible for owning the follow-ups
     * placement instead — used by `AiCfoQuestionAnswer` when an
     * interactive form answer is swapped for the in-place
     * "Creating…" / "Created" tile (follow-ups appear under the tile
     * only after the synthetic answer transitions to `created_*`).
     */
    suppressFollowUpQuestions?: boolean;
    /**
     * When `true`, an `interactive_form` visualization in the answer is
     * not rendered. Used by `AiCfoQuestionAnswer` for the `errored_*`
     * synthetic-bubble case: the original form's submission failed
     * (snackbar already shown), so the form is hidden while the rest of
     * the answer + follow-ups stay visible.
     */
    suppressInteractiveForm?: boolean;
    onCopy: (content: string) => void;
    onQuestionClick: (question: string, source: AICFOChatSubmissionSource, input?: number) => void;
    onThumbsDown: (questionAnswerId: ID) => void;
    onThumbsUp: (questionAnswerId: ID) => void;
    onTypingDoneForSection: (aiCfoAnswerResponseType: AiCfoAnswerResponseType) => void;
    /**
     * Debounced (300ms) flush of the card-policy RHF watch subscription;
     * the screen owner dispatches `updateAiCardPolicyFormDraft(draft)`.
     * Required (alongside `onCardPolicyFormSubmit`) to render the card-policy
     * form (kill-switch).
     */
    onCardPolicyFormChange?: (draft: CardPolicyFormDraft) => void;
    /**
     * Submission handler for the AI Card Policy interactive form. Required
     * when the AI returns an `interactive_form` answer with
     * `formType === "card_policy"`; optional otherwise. The originating
     * `aiCfoAnswerId` is forwarded so the host can link the synthetic
     * "Creating…" / "Created" bubble back to this answer for the in-place
     * renderer.
     */
    onCardPolicyFormSubmit?: (draft: CardPolicyFormDraft, aiCfoAnswerId: ID) => void;
    /**
     * Fired when the user clears the uploaded document via the × button.
     * Owners should dispatch `clearPolicyDocumentExtraction`.
     */
    onCardPolicyRemoveDocument?: () => void;
    /**
     * Fired when the user picks a file in the `upload` Step 1 drop
     * zone. Owners should dispatch `extractPolicyDocument(files,
     * aiCfoAnswerId, aiCfoChatSessionId)` — the IDs are forwarded so the
     * bridge epic can chain the recommendation API call against the
     * originating AI CFO answer once extraction succeeds.
     */
    onCardPolicyUploadDocument?: (files: File[], aiCfoAnswerId?: string, aiCfoChatSessionId?: string) => void;
    /**
     * Fired on every keystroke in the vendor chip picker's search input.
     * The screen owner debounces + dispatches
     * `fetchCardPolicyVendorOptions(text)`.
     */
    onCardPolicyVendorSearchTextChange?: (text: string) => void;
    /**
     * Debounced (300ms) flush of the cards-creation RHF watch subscription;
     * the screen owner dispatches `updateAiCardCreationFormDraft(draft)`.
     * Required to render the cards-creation form (kill-switch).
     */
    onCardsCreationFormChange?: (draft: CardsFormDraft) => void;
    /**
     * Submission handler for the AI Card Creation interactive form. Required
     * when the AI returns an `interactive_form` answer with
     * `formType === "cards_creation"`; optional otherwise. The originating
     * `aiCfoAnswerId` is forwarded so the host can link the synthetic
     * "Creating…" / "Created" bubble back to this answer for the in-place
     * renderer.
     */
    onCardsCreationFormSubmit?: (values: CardsFormDraft, aiCfoAnswerId: ID) => void;
}
/**
 * Renders the "Follow-up questions" footer block shown below an AI CFO
 * answer (header + clickable list). Exported so the in-place renderer
 * in `AiCfoQuestionAnswer` can show the same block under the
 * "Created" tile once an interactive-form answer has been swapped.
 */
export declare const FollowUpQuestions: ({ followUpQuestions, onQuestionClick, }: {
    followUpQuestions: string[];
    onQuestionClick: (question: string, source: AICFOChatSubmissionSource, input?: number) => void;
}) => import("react/jsx-runtime").JSX.Element | null;
export declare const Shine: import('@emotion/styled').StyledComponent<{
    theme?: import('@emotion/react').Theme;
    as?: React.ElementType;
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
declare const AiCfoAnswer: React.FC<AiCfoAnswerProps>;
export default AiCfoAnswer;
/**
 * Local UI mirror of `@zeniai/client-epic-state`'s `InteractiveFormVisualization`.
 *
 * Discriminated on `formType` so each feature can carry its own payload
 * shape and the renderer can pick the matching wrapper. For `card_policy`
 * the renderer doesn't consume the payload — `seedAiCardPolicyFormDraftEpic`
 * in CES ingests it from the AI CFO answer action and exposes the result
 * via `aiCardPolicyFormDraft`, so we only need the discriminator. The
 * payload field is kept so the runtime guard still matches the wire shape.
 */
export type InteractiveFormVisualization = {
    formType: "cards_creation";
    payload: CardsCreationInitialData;
} | {
    formType: "card_policy";
    payload: unknown;
};
