import 'rollup-plugin-inject-process-env'; import React, { FC } from "react"; import { Display } from "stentor-models"; import { FormNextData, FormStepUpdateDisplay } from "../FormDisplay/model"; export interface ResponseDisplayProps { readonly display: Display; readonly loading: boolean; onActionResponse(data: unknown, action: string): 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; } export declare const ResponseDisplay: FC;