import type { CustomAnimationConfig } from './types/animations' import type { DefaultLayoutConfig, DefaultVariants } from './defaultConfig/types' import type { NotificationPosition } from './types/config' import type { GestureConfig } from './types/gestures' import type { ComponentProps, VFC } from 'react' import type { ModifiedEmitParam } from './core/services/types' declare global { namespace Notificated { interface CustomVariants {} } } import type { AnimationBuilder } from './core/utils/generateAnimationConfig' export type RequiredProps>> = ComponentProps export type Variant = { component: T config?: Partial> } export type VariantsMap = Record>> type CustomVariants = Notificated.CustomVariants export type Variants = CustomVariants[keyof CustomVariants] extends never ? DefaultVariants : CustomVariants export type NotificationConfigBase = { duration: number notificationPosition: NotificationPosition animationConfig: AnimationBuilder | CustomAnimationConfig gestureConfig: GestureConfig isNotch?: boolean notificationWidth?: number onClose?: () => void } export type NotificationsConfig = { variants: Variants } & NotificationConfigBase & DefaultLayoutConfig export type { CustomAnimationConfig } export type Modify = (id: string, params: Partial) => void export type Remove = (id: string) => void export type Notify = ( notificationType: Variant, setup: { params: RequiredProps; config?: Partial } ) => { id: string } export type UseNotification = () => Emmiter export type CreateNotificationsReturnType = { useNotifications: UseNotification NotificationsProvider: React.FC>> ModalNotificationsProvider: React.FC< React.PropsWithChildren<{ notificationTopPosition?: number }> > CustomVariantsTypeHelper: V } & ReturnType> export type Emmiter = { remove: Remove modify: Modify notify: Notify }