<!-- Push section css -->
<?= $this->section('css') ?>
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/toastr/toastr.css') ?>"/>
<?= $this->endSection() ?>

<!-- Push section js -->
<?= $this->section('additionalExternalJs') ?>
<script src="<?= site_url('themes/vuexy/vendor/libs/toastr/toastr.js') ?>"></script>
<?= $this->endSection() ?>

<?= $this->section('additionalInlineJs') ?>

toastr.options = {
    "closeButton": false,
    "debug": false,
    "newestOnTop": false,
    "progressBar": false,
    "positionClass": "toast-top-right",
    "preventDuplicates": false,
    "onclick": null,
    "showDuration": "300",
    "hideDuration": "1000",
    "timeOut": "5000",
    "extendedTimeOut": "1000",
    "showEasing": "swing",
    "hideEasing": "linear",
    "showMethod": "fadeIn",
    "hideMethod": "fadeOut"
};

<?php if (session('sweet-success')) {
    if (isset($alertStyle) && ($alertStyle == 'toastr')) { ?>
        toastr.success(`<?= session('sweet-success') ?>`);
    <?php } else { ?>
        popSuccessAlert(`<?= session('sweet-success') ?>`);
    <?php }
}
?>

<?php if (session('sweet-warning')) {
    if (isset($alertStyle) && ($alertStyle == 'toastr')) { ?>
        toastr.warning(`<?= session('sweet-warning') ?>`);
    <?php } else { ?>
        popWarningAlert(`<?= session('sweet-warning') ?>`);
    <?php }
}
?>

<?php if (session('sweet-error')) {
    if (isset($alertStyle) && ($alertStyle == 'toastr')) { ?>
        toastr.error(`<?= session('sweet-error') ?>`);
    <?php } else { ?>
        popErrorgAlert(`<?= session('sweet-error') ?>`);
    <?php }
}
?>

<?= $this->endSection() ?>