import { FormStyleTypes, FormTypes } from '../constants/FormStepTypes'; import { Branding } from './Branding'; import { FormStep } from './FormStep'; import { Entity } from './Entity'; import { EurekaDraft } from './Draft/Draft'; export interface Form { apiKey?: string; name?: string; sections: Record; steps: Record; size: FormSize; firstSection: string; type?: FormTypes; hasLogin?: boolean; hasCaptcha?: boolean; isStandAlone?: boolean; style?: FormStyle; branding?: Branding; classifiers?: Record; entities?: Record; terms?: Term[]; hiddenSteps?: string[]; confirmationMessage?: EurekaDraft; showLink?: boolean; nextSectionLabel?: string; prevSectionLabel?: string; } export interface FormSize { blockNum: 1 | 2 | 3 | 4; blockSize: number; spacingSize: number; } export interface Term { id: string; message: string; clickEffect?: TermDialog | TermLink; } interface TermDialog { type: 'DIALOG'; title: string; text: string; } interface TermLink { type: 'LINK'; url: string; } export interface Classifier { _id: string; name: string; clientName?: string; children: string[]; } export type FormStyle = MaterialStyle; export type StyleKeys = keyof Omit; export interface MaterialStyle { type: FormStyleTypes.MATERIAL; standAloneBackgroundColor: string; backgroundColor: string; primaryColor: string; secondaryColor: string; errorColor: string; primaryContrastColor: string; secondaryContrastColor: string; textColor: string; outlineColor: string; stepBackgroundColor: string; descriptionTextColor: string; } export interface Section { id: string; name: string | null; title?: string; steps: string[]; nextSection: string | null; } export {};