/*
 Must return javascript code

 PHP code will be parsed

 <?php
 echo time();


 require_once(MH_DIR_CONFIG . 'config_email_engine_n2g/classes/newsletter2go_v2.class.php');

 $register_url = NL2GO\Api::buildEntrypoint();


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


    steps: [

        {
            title: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_TITLE_TOUR_STEP1'); ?>",
            content: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_CONTENT_TOUR_STEP1'); ?>",
            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=configbeez&module=config_email_engine'); ?>"
            }
        },
        {
            title: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_TITLE_TOUR_STEP2'); ?>",
            content: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_CONTENT_TOUR_STEP2'); ?>",
            target: document.querySelector('[id*="config_email_engine"]'),
            placement: "right",
            xOffset: "center",
            yOffset: -20,

            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&module=config_email_engine&action=edit'); ?>"
            }

        },
        {
            title: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_TITLE_TOUR_STEP3'); ?>",
            content: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_CONTENT_TOUR_STEP3'); ?>",
            target: document.querySelector('input[name*="MAILBEEZ_CONFIG_EMAIL_ENGINE"]'),
            placement: "left",
            yOffset: -10,
            multipage: false, // indicates that the next step is on a different page.
            showNextButton: true,
            width: 500
        }


        /*<?php if ( !(preg_match('/Newsletter2Go/',  mh_cfg('MAILBEEZ_CONFIG_EMAIL_ENGINE') ) )) { ?>*/
        /*
        ,
        {
            title: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_TITLE_TOUR_STEP4'); ?>",
            content: "<?php echo mh_lng('MH_TOUR_SETUP_MAILSERVER_CONTENT_TOUR_STEP4'); ?>",
            target: document.querySelector('input[name*="MAILBEEZ_CONFIG_EMAIL_ENGINE"]'),
            placement: "left",
            yOffset: -10,
            multipage: false, // indicates that the next step is on a different page.
            showNextButton: true,
            width: 500,
            ctaLabel: '<?php echo mh_lng('MAILBEEZ_CONFIG_EMAIL_ENGINE_N2G_REGISTER_BUTTON'); ?>',
            zindex: 1

            ,
            showCTAButton: true,
            onCTA: function () {
                var win = window.open('<?php echo $register_url; ?>', '_blank');
                win.focus();
                hopscotch.endTour(true);

            }
        }
        */

        /*<?php } ?>*/

    ]
}

