import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType'; import { type ImageContent } from '../../ui-kit/Img/ImgProps'; import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent'; import { type UniBlockContent } from '../../UniBlock/UniBlockProps'; /** * @title Изображение */ export type ErrorImageDef = ImageContent & { /** @default Image */ contentType: 'Image'; }; /** * @title Код ошибки */ export type ErrorCodeDef = { contentType: 'Code'; code?: ErrorType; }; /** @title Вид контента */ export type ErrorContentDef = ErrorCodeDef | ErrorImageDef; /** @title Код */ export type ErrorType = | '' | '400' | '401' | '402' | '403' | '404' | '500' | '501' | '502' | '503' | '504' | '505'; /** * @title Блок ошибки */ export type ErrorBlockContent = UniBlockContent & TitleProps & DescriptionProps & { error?: ErrorContentDef; /** @title Кнопка */ button?: LinkButtonContent; };