/* eslint react/jsx-filename-extension: 0 */ import React from 'react'; import { toast } from 'react-toastify'; import { isEqual } from 'radash'; import Styled from './styles'; import Toast from '/imports/ui/components/common/toast/component'; let lastToast = { id: null, message: null, type: null, icon: null, }; export function notify(message, type = 'default', icon, options, content, small) { const settings = { type, ...options, }; const { id: lastToastId, ...lastToastProps } = lastToast; const toastProps = { message, type, icon, content, small, }; if (!toast.isActive(lastToast.id) || !isEqual(lastToastProps, toastProps)) { if (options?.helpLink != null && options?.helpLabel != null) { const id = toast(