import { type AspectsProps } from '../../model/AspectsProps'; import { type ColumnsCount } from '../../model/ColumnCount'; import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef'; import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType'; import { type InputSectionsType } from '../../model/InputSectionsType'; import { type LinkButtonVersion } from '../../model/LinkButtonVersion'; import { type Target } from '../../model/LinkProps'; import { type PlaceholderProps } from '../../model/PlaceholderProps'; import { type NameFieldDef } from '../../ui-kit/FormField/NameFieldDef'; import { type UniBlockContent } from '../../UniBlock/UniBlockProps'; interface Required { /** @title Обязательно для заполнения */ required?: boolean; } export declare type SubmitButtonProps = TextProps & { version?: LinkButtonVersion; }; export declare type ConditionFieldProps = { /** @title Условия отображения полей формы */ condition?: { name: NameFieldDef; /** @title Значения при которых отображаются поля */ values: string[]; }; }; export declare type FilledByEsiaProps = { /** @title Заполняется через госуслуги */ filledByEsia?: boolean; }; /** @hidden */ export declare type FileProps = { maxSize?: number; extensions?: string[]; }; export declare type FieldDef = Required & LabelProps & ConditionFieldProps & FilledByEsiaProps & PlaceholderProps & FileProps & { name?: NameFieldDef; dadata?: boolean; defaultValue?: string; customName?: string; }; /** @hidden */ export declare type EndpointType = 'lead' | 'initcorporatelead' | 'confirmCorporateLead' | 'sendcorporatelead' | 'callback' | 'practice' | 'internship'; /** * @title Секция полей ввода */ export declare type SectionsProps = TitleProps & { columns?: ColumnsCount; inputs?: FieldDef[]; }; /** @title Дефолтная форма */ declare type hideProductDef = { /** @default "" */ showProduct: ''; }; /** @title Продуктовая форма */ declare type showProductDef = productType & { /** @default "show" */ showProduct: 'show'; }; declare type productType = { /** @title Продукт */ product?: string; }; /** @title Премиум форма */ declare type premiumForm = { /** @title Форма для премиума */ isPremium?: boolean; }; /** * @title Отображать выбор продукта * @default { "showProduct": "" } */ export declare type additionalParamsType = premiumForm | hideProductDef | showProductDef; /** * @title Форма заявки настраиваемая */ export declare type ApplicationFormContent = UniBlockContent & TitleProps & AspectsProps & InputSectionsType & { /** @title Кнопка */ button?: SubmitButtonProps; /** * @title Условия передачи данных * @required ["text", "href"] */ link?: TextProps & { /** @title URL (href) */ href?: string; /** @default "" */ target?: Target; }; typeForm?: FormTypeFieldDef; endpoint?: EndpointType; /** @title Дополнительные параметры формы */ additionalParams?: additionalParamsType; /** @title Отправить событие в Snowplow */ withSnowplow?: boolean; /** @title Показать контакты */ isContacts?: boolean; }; export {};