import { IconAlertTriangle, IconAlertCircle, IconCheck } from '@tabler/icons'


export const generateNotification = (notificationType, title, message, noClose, id) => {
    // Generates the notification so you can push it to the queue
    let baseNotification = {
        id: id ? id : null,
        dissallowClose: noClose ? noClose : false, 
        title: title,
        message: message,
        color: 'red',
        icon: null,
    }

    switch (notificationType) {
        case "error":
            baseNotification.color = 'red'
            baseNotification.icon = <IconAlertTriangle size={16} />
            break;
        case "warning":
            baseNotification.color = 'yellow'
            baseNotification.icon = <IconAlertCircle size={16} />
            break;
        case "success":
            baseNotification.color = 'green'
            baseNotification.icon = <IconCheck size={16}/>
            break;
        default:
            break;
    }
    console.log("MY NOTIFICATION: ", baseNotification)
    return baseNotification
}