import React from 'react'; import { FontStyleTypeModel } from '../../Themes/theme_types'; import { Color } from '../../types'; type colorsAvailable = Color.green | Color.dark | Color.blue; export interface ToastProps { id: string; title?: string; message?: string; closeBtnIcon?: string; customClass?: string; isCloseIcon?: boolean; action?: toastAction; isLoading?: boolean; color?: colorsAvailable; isError?: boolean; isInverse?: boolean; duration?: number; withProgress?: boolean; deleteToast?: (id: string) => void; } export interface ToastStateContext { color: ColorProp; isError: boolean; dayTime: 'light' | 'dark'; isLoading: boolean; } export type ColorProp = Color.green | Color.dark | Color.blue | 'red'; interface toastAction { title: string; actionFunc: (e: React.SyntheticEvent) => void; } interface kindTheme { backgroundColor: string; fontColor: string; divider: string; progressBackground: string; } interface ModelView { style: { theme: { light: { dark: kindTheme; blue: kindTheme; green: kindTheme; red: kindTheme; }; dark: { dark: kindTheme; blue: kindTheme; green: kindTheme; red: kindTheme; }; }; title: { font: FontStyleTypeModel; }; message: { font: FontStyleTypeModel; }; }; } interface ContainerProps { styles: ModelView; state: ToastStateContext; } export type { ContainerProps };