import React from 'react'; import { Classifier, Form } from '../@Types/Form'; import './App.css'; import { CustomStep, CustomStepProps } from '../FormSteps/CustomStep'; import { EditorState } from 'draft-js'; import { CountryCode } from 'libphonenumber-js'; import { EurekaDraft } from '../@Types/Draft/Draft'; export interface AppProps { /** If the app is currently a widget */ isWidget?: boolean; /** The id of the current agent using the form (Internal)*/ idCurrentAgent?: string; /** The apikey of the Form */ apiKey?: string; /** The id of the form's organization */ idOrganization?: string; /** The form to display, (used for postviews) */ formData?: Form; /** If the widget is usedInternally */ internal?: boolean; /** If the widget is a postview (view what the user filled)*/ postview?: boolean; /** If postview should only show steps with values*/ partial?: boolean; /** If the widget is a preview (view from admin)*/ preview?: boolean; /** If the form can be edited (For entities) */ editable?: boolean; /** The custom send label to display */ sendLabel?: string; /** The data to fill the form with */ valuesData?: Record; /** Custom steps to display */ customSteps?: Record; /** Custom steps to display */ customStepProps?: Record; /** Classifiers dict */ classifiers?: Record; /** Custom Confirmation Content */ customConfirmation?: (confirmation: { url: string; idTicket: string; caseNumber: string; }, renderIcon: () => JSX.Element, renderConfirmation: (state?: EditorState) => JSX.Element | void, renderLink: () => JSX.Element | void, onClose: () => void) => JSX.Element; customClientInfoStep?: (props: CustomStepProps) => JSX.Element; /** Custom function to call on send */ customSubmit?: (values: Record, reload: () => void) => Promise; /** Custom submit function, when passed it is called */ setSubmit?: (submit: () => Promise>) => void; /** Custom submit buttons */ customSubmitBtns?: null | ((onSubmit: () => Promise | void>, loading: boolean) => JSX.Element); /** Function to call on postview to fetch the download url of a file */ fetchDownloadUrl?: (S3Key: string, fileName: string) => Promise; /** Function to call to map entities internally (postview, activities) */ mapDraftEntities?: (property: string, dependencies: Record) => Promise; /** Function to call after the confimation dialog has been closed */ handleConfirmed?: () => void; /** Function called to scroll to the top */ scrollToTop?: () => void; /** The default country to use in phone pickers */ countryCode?: CountryCode; } export declare const IdFormContext: React.Context; declare function AppComponent({ formData, valuesData, ...props }: AppProps): JSX.Element; export default AppComponent;