﻿@using static Fabula.Common.Messages.NotificationTypes;

@if (TempData.ContainsKey(ErrorNotification))
{
    <script>
        toastr.options = {
            "closeButton": true,
            "positionClass": "toast-top-center",
            "preventDuplicates": true
        }

        toastr.error('@TempData[ErrorNotification]');
    </script>
}

@if (TempData.ContainsKey(WarningNotification))
{
    <script>
        toastr.options = {
            "closeButton": true,
            "positionClass": "toast-top-center",
            "preventDuplicates": true
        }

        toastr.warning('@TempData[WarningNotification]');
    </script>
}

@if (TempData.ContainsKey(InformationNotificaiton))
{
    <script>
        toastr.options = {
            "closeButton": true,
            "positionClass": "toast-top-center",
            "preventDuplicates": true
        }

        toastr.info('@TempData[InformationNotificaiton]');
    </script>
}

@if (TempData.ContainsKey(SuccessNotification))
{
    <script>
        toastr.options = {
            "closeButton": true,
            "positionClass": "toast-top-center",
            "preventDuplicates": true
        }

        toastr.success('@TempData[SuccessNotification]');
    </script>
}
