<?php

/**
 * This file contains QUI\Tour\EventHandler
 */

namespace QUI\Tour;

/**
 * Class EventHandler
 * @package QUI\Tour
 */
class EventHandler
{
    /**
     * event: on admin load
     */
    public static function onAdminLoadFooter()
    {
        if (!defined('ADMIN')) {
            return;
        }

        if (!ADMIN) {
            return;
        }

        echo '<script src="' . URL_OPT_DIR . 'quiqqer/tour/bin/load.js"></script> ' . "\n";
        echo '<script>
                require(["qui/QUI", "package/quiqqer/tour/load"], function(QUI, loadTour) {
                    if (parseInt(QUI.Storage.get("ShowTourQuestionMark"))) {
                        loadTour();     
                    }
                });
            </script>';
    }
}
