<?php
/* Prohibit direct script loading */
defined('ABSPATH') || die('No direct script access allowed!');
$wizard = new WpmsInstallWizard();
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- View request, no action
$step      = isset($_GET['step']) ? sanitize_key($_GET['step']) : '';
$next_link = $wizard->getNextLink($step);
$ext_name = 'wp-meta-seo-addon';

$ju_update_link = JU_BASE . 'index.php?option=com_juupdater&view=connect&tmpl=component&ext_name='.$ext_name.'&site=' . site_url() . '&TB_iframe=true&width=600&height=550';

?>

<form method="post" id="quick-config-form">
    <?php wp_nonce_field('wpms-setup-wizard', 'wizard_nonce'); ?>
    <input type="hidden" name="wpms_save_step" value="1"/>
    <div class="wizard-header">
        <div class="title h1 font-size-35"><?php esc_html_e('JoomUnited login & plugin license', 'wpmsPro'); ?></div>
        <p class="description"><?php echo esc_html__('Unlock the full potential of your plugin by connecting to your JoomUnited account. Once logged in, you\'ll get access to premium plugin features and functionality, automatic plugin updates to ensure security and performance and direct access to our dedicated support team.', 'wpmsPro'); ?></p>
    </div>
    <div class="wizard-content">
        <div class="description center">
            <?php esc_html_e('Simply click the login button below and use your JoomUnited account credentials to get started.', 'wpmsPro'); ?>
        </div>
        <div class="joomunited-login-wrapper">
            <a href="<?php echo esc_url_raw($ju_update_link); ?>" class="thickbox ju-button ju-license-button" type="button"><?php esc_html_e('LOGIN NOW >>>', 'wpmsPro'); ?></a>
        </div>
        <div class="description center">
            <?php esc_html_e('Note: Use the same email and password as your JoomUnited website account.', 'wpmsPro'); ?>
        </div>
    </div>
</form>
<script>
    var ajaxurl = '<?php echo esc_url(admin_url('admin-ajax.php'));?>';
    var wpmsNextStep = '<?php echo admin_url('index.php?page=wpms-setup&step=wizard_start'); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>';
    console.log(wpmsNextStep);
</script>