import React from "react";
import { NotificationManager } from "react-notifications";

const createNotification = (type, message, title = "") => {
  switch (type) {
    case "info":
      NotificationManager.info(message, title);
      break;
    case "success":
      NotificationManager.success(message, title);
      break;
    case "warning":
      NotificationManager.warning(message, title, 50000);
      break;
    case "error":
      NotificationManager.error(message, title, 3000);
      break;
    default:
      NotificationManager.info(message, title);
      break;
  }
};

export { createNotification };
