    
    <script src="<?= base_url('assets/backdesk/js/vendor.bundle.base.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/off-canvas.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/hoverable-collapse.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/misc.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/settings.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/todolist.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/jquery.cookie.js') ?>"></script>
    <script src="<?= base_url('assets/backdesk/js/sweetalert.min.js') ?>" ></script>
    <script src="<?= base_url('assets/backdesk/js/jquery.validate.min.js') ?>" ></script>
    <script src="<?= base_url('assets/backdesk/js/jquery.form.min.js') ?>" ></script>

    <!-- Include Trumbowyg Assets -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/trumbowyg@2.25.1/dist/ui/trumbowyg.min.css">

    <script src="https://cdn.jsdelivr.net/npm/trumbowyg@2.25.1/dist/trumbowyg.min.js"></script>
  
    <!--alert-->
    <script>
        (function($) {
          showSwal = function(type) {
            'use strict';
            if (type === 'basic') {
              swal({
                text: 'Any fool can use a computer',
                button: {
                  text: "OK",
                  value: true,
                  visible: true,
                  className: "btn btn-primary"
                }
              })
        
            } else if (type === 'title-and-text') {
              swal({
                title: 'Read the alert!',
                text: 'Click OK to close this alert',
                button: {
                  text: "OK",
                  value: true,
                  visible: true,
                  className: "btn btn-primary"
                }
              })
        
            } else if (type === 'success-message') {
              swal({
                title: 'Congratulations!',
                text: 'You entered the correct answer',
                icon: 'success',
                button: {
                  text: "Continue",
                  value: true,
                  visible: true,
                  className: "btn btn-primary"
                }
              })
        
            } else if (type === 'auto-close') {
              swal({
                title: 'Auto close alert!',
                text: 'I will close in 2 seconds.',
                timer: 2000,
                button: false
              }).then(
                function() {},
                // handling the promise rejection
                function(dismiss) {
                  if (dismiss === 'timer') {
                    console.log('I was closed by the timer')
                  }
                }
              )
            } else if (type === 'warning-message-and-cancel') {
              swal({
                title: 'Are you sure?',
                text: "You won't be able to revert this!",
                icon: 'warning',
                showCancelButton: true,
                confirmButtonColor: '#3f51b5',
                cancelButtonColor: '#ff4081',
                confirmButtonText: 'Great ',
                buttons: {
                  cancel: {
                    text: "Cancel",
                    value: null,
                    visible: true,
                    className: "btn btn-danger",
                    closeModal: true,
                  },
                  confirm: {
                    text: "OK",
                    value: true,
                    visible: true,
                    className: "btn btn-primary",
                    closeModal: true
                  }
                }
              })
        
            } else if (type === 'custom-html') {
              swal({
                content: {
                  element: "input",
                  attributes: {
                    placeholder: "Type your password",
                    type: "password",
                    class: 'form-control'
                  },
                },
                button: {
                  text: "OK",
                  value: true,
                  visible: true,
                  className: "btn btn-primary"
                }
              })
            }
  }
        })(jQuery);
    </script>
    <!--toaster-->
   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js" integrity="sha512-zlWWyZq71UMApAjih4WkaRpikgY9Bz1oXIW5G0fED4vk14JjGlQ1UmkGM392jEULP8jbNMiwLWdM8Z87Hu88Fw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
   <script>
        function toast($type,$msg){
            // alert($type)
            $.toast({
              heading: ($type == 'danger') ? 'Oops!' : 'Great!',
              text: $msg,
              showHideTransition: 'slide',
              icon: ($type == 'danger') ? 'error' : 'success',
              loaderBg: '#57c7d4',
              position: 'top-right'
            })   
        }
    </script>