import { FieldValues } from 'react-hook-form'; import { CustomIcon } from '../Icons/BuiltInIconRenderer'; type InputType = 'CHECKBOX' | 'EMAIL' | 'FILE' | 'TEXT' | 'TEXTAREA'; export declare const defaultInputValues: { TEXT: string; EMAIL: string; CHECKBOX: boolean; TEXTAREA: string; FILE: undefined; }; export declare enum SpecialFieldNames { IncludeChatSession = "include_chat_session" } export declare const specialFieldDefaults: { INCLUDE_CHAT_SESSION: { inputType: InputType; label: string; name: SpecialFieldNames; }; }; export interface IncludeChatSessionField { type: 'INCLUDE_CHAT_SESSION'; label?: string; required?: boolean; defaultValue?: boolean; isHidden?: boolean; } export interface FormField { type: 'STANDARD_FIELD'; name: string; label: string; inputType: InputType; placeholder?: string; required?: boolean; defaultValue?: boolean | string; isHidden?: boolean; } export type FieldType = FormField | IncludeChatSessionField; interface UserMessage { role: 'user'; content: string; } interface AssistantMessage { role: 'assistant'; content: string; } export type Message = AssistantMessage | UserMessage; export interface ChatSession { messages: Message[]; chatSessionId: string; } export interface Client { currentUrl: string; } export interface SubmitCallbackArgs { formDetails: FieldValues; chatSession: ChatSession | null; client: Client; } export type SubmitCallback = (values: SubmitCallbackArgs) => Promise<{ success: boolean; }>; export interface SuccessConfirmationButton { label: string; icon?: CustomIcon; closeFormAction?: CloseFormAction; } export interface SuccessConfirmationPageProps { heading?: string; message?: string; successConfirmationButton?: SuccessConfirmationButton; } export interface FormConfig { heading?: string; description?: string; fields: FieldType[]; submitButtonLabel?: string; submitCallback: SubmitCallback; successConfirmationPage?: SuccessConfirmationPageProps; closeFormAction?: CloseFormAction; } export interface FormConfigWithChatSession { formConfig: FormConfig; chatSession: ChatSession; } export type CloseFormAction = BackToChatFormAction | ModalCloseFormAction; interface BackToChatFormAction { type: 'BACK_TO_CHAT'; } interface ModalCloseFormAction { type: 'CLOSE_MODAL'; } export {};