import 'rollup-plugin-inject-process-env'; import React, { FC } from "react"; import { Response, SuggestionTypes } from "stentor-models"; import { FormNextData, FormStepUpdateDisplay } from "../FormDisplay/model"; export interface FormResponseProps { readonly response: Response; readonly className?: string; readonly loading: boolean; onActionClick(action: SuggestionTypes): void; onActionResponse(data: unknown, action: string): void; onAudioChange(isOn: boolean): void; onTrackNextStep?: (stepName: string, stepIndex: number, stepData: Record, isLastStep: boolean) => void; onTrackPreviousStep?: (fromStepName: string, fromStepIndex: number, toStepName: string, toStepIndex: number) => void; onTrackSubmit?: (stepName: string, stepIndex: number, completedData: Record, totalSteps: number) => void; /** * Callback to track a FORM_SUBMIT dispatch that failed outright (issue #1373). */ onTrackSubmitFailure?: (stepName: string, stepIndex: number, totalSteps: number, reason: string) => void; currentStepDataRef?: React.MutableRefObject>; /** Zero-based step to open the form on, instead of the first. */ readonly initialStep?: number; /** Open the date/time step on the soonest day that has times. */ readonly preselectFirstAvailableDate?: boolean; /** Fired with the step index when initialStep is applied. */ onTrackInitialStep?: (stepIndex: number) => void; onFormNext?: (data: FormNextData) => Promise; stepUpdate?: FormStepUpdateDisplay; onTrackHandoffRendered?: (stepName: string, provider: string) => void; onTrackHandoffNoRender?: (stepName: string, provider: string) => void; onTrackHandoffScheduled?: (stepName: string, provider: string, payload?: unknown) => void; onTrackHandoffError?: (stepName: string, provider: string) => void; } /** * FormResponse displays the data from the handler */ export declare const FormResponse: FC;