/*
 Must return javascript code

 PHP code will be parsed

 <?php
 echo time();
 $tour = array(

 'steps' => array(
 array(
 'title' => 'first title'
 ),
 array(
 'title' => 'second title'
 ),
 )

 );?>
 */
// Define the tour!
var tour = {
    nextOnTargetClick: true,
    //showPrevButton: true,


    steps: [

        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_TOUR; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_TOUR; ?>",
            target: document.querySelector('[id*="tab_tour"]'),
            placement: "bottom",
            multipage: true, // indicates that the next step is on a different page.
            showNextButton: true,

            onNext: function () {
                window.location = "<?php echo mh_href_link(FILENAME_MAILBEEZ, 'tab=home'); ?>"
            }
        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_DASHBOARD; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_DASHBOARD; ?>",
            target: document.querySelector('[id*="tab_dashboard"]'),
            placement: "bottom",
            multipage: true, // indicates that the next step is on a different page.
            showNextButton: true,

            onNext: function () {
                window.location = "<?php echo mh_href_link(FILENAME_MAILBEEZ, 'tab=mailbeez'); ?>"
            }

        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_MAILBEEZ; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_MAILBEEZ; ?>",
            target: document.querySelector('[id*="tab_mailbeez"]'),
            placement: "bottom",
            multipage: true, // indicates that the next step is on a different page.
            showNextButton: true,

            onNext: function () {
                window.location = "<?php echo mh_href_link(FILENAME_MAILBEEZ, 'tab=filterbeez'); ?>"
            }
        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_FILTERBEEZ; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_FILTERBEEZ; ?>",
            target: document.querySelector('[id*="tab_filterbeez"]'),
            placement: "bottom",
            multipage: true, // indicates that the next step is on a different page.
            showNextButton: true,

            onNext: function () {
                window.location = "<?php echo mh_href_link(FILENAME_MAILBEEZ, 'tab=reportbeez'); ?>"
            }
        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_REPORTBEEZ; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_REPORTBEEZ; ?>",
            target: document.querySelector('[id*="tab_reportbeez"]'),
            placement: "bottom",
            multipage: true, // indicates that the next step is on a different page.
            showNextButton: true,

            onNext: function () {
                window.location = "<?php echo mh_href_link(FILENAME_MAILBEEZ, 'tab=configbeez'); ?>"
            }
        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_CONFIGBEEZ; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_CONFIGBEEZ; ?>",
            target: document.querySelector('[id*="tab_configbeez"]'),
            placement: "bottom",
            multipage: true, // indicates that the next step is on a different page.
            showNextButton: true,

            onNext: function () {
                window.location = "<?php echo mh_href_link(FILENAME_MAILBEEZ, 'tab=about'); ?>"
            }
        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_ABOUT; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_ABOUT; ?>",
            target: document.querySelector('[id*="tab_about"]'),
            placement: "bottom",

            showNextButton: true
        },
        {
            title: "<?php echo MH_TOUR_INTRO_TITLE_PRO; ?>",
            content: "<?php echo MH_TOUR_INTRO_CONTENT_PRO; ?>",
            target: document.querySelector('[class*="cloudbeez_select_button"]'),
            placement: "bottom",

            ctaLabel: '<?php echo MAILBEEZ_MAILHIVE_CLOUDLOADER_SELECT_PACKAGE_BUTTON; ?>',

            showCTAButton: true,
            onCTA: function () {
                document.querySelector('a[href*="plans?cla=buy"]').click();
                hopscotch.endTour(true);
            }
        }
    ]
};