import React, { ReactNode } from 'react' import { InAppNotificationsConfig } from '../defaultConfig/defaultConfig' import { getNotificationEmmiter } from './services/NotificationEmitterApi' import type { CreateNotificationsReturnType, NotificationsConfig, VariantsMap } from '../types' import { NotificationsRenderer } from './renderers/NotificationsRenderer' import { NotificationContext } from './hooks/useNotificationConfig' import type { DefaultVariants } from '../defaultConfig/types' export const createNotifications = ( config?: Partial> ): CreateNotificationsReturnType => { const emitter = getNotificationEmmiter() const CustomVariantsTypeHelper = {} as V const NotificationsProvider = ({ children = null }: { children?: ReactNode }) => { return ( {children} ) } const ModalNotificationsProvider = ({ children = null, notificationTopPosition, }: { children?: ReactNode notificationTopPosition?: number }) => { return ( {children} ) } const useNotifications = () => emitter return { useNotifications, NotificationsProvider, CustomVariantsTypeHelper, ModalNotificationsProvider, ...emitter, } }