<div class="wrap">
  <h1><?php _e('Baqend &rsaquo; Getting Started', 'baqend') ?></h1>

  <?php if ($app_name === null): ?>
    <?php include 'loginForm.phtml'; ?>
  <?php else: ?>
    <?php include 'tabs.phtml'; ?>

    <div class="getting-started">
      <ul class="getting-started-actions">
        <li>
          <a href="admin.php?page=baqend_speed_kit">
            <p class="getting-started-heading">
              <img src="<?php echo plugin_dir_url(__DIR__) ?>img/rocket-outline.png">
              <?php _e('Speed Kit', 'baqend') ?>
            </p>
            <p><?php _e('With Speed Kit, you can improve the performance of your currently hosted WordPress blog within seconds!', 'baqend') ?></p>
            <p>
              <?php _e('Speed Kit is currently', 'baqend') ?>
              <?php if ($speed_kit): ?>
                <span class="enabled"><?php _e('enabled', 'baqend') ?></span>
              <?php else: ?>
                <span class="disabled"><?php _e('disabled', 'baqend') ?></span>
              <?php endif; ?>
            </p>
          </a>
        </li>
        <li>
          <?php if ($hosting_enabled): ?>
          <a href="admin.php?page=baqend_hosting">
          <?php else: ?>
          <a href="admin.php?page=baqend_account">
          <?php endif; ?>
            <p class="getting-started-heading">
              <img src="<?php echo plugin_dir_url(__DIR__) ?>img/icon_code.png">
              <?php _e('Hosting', 'baqend') ?>
            </p>
            <p><?php _e('With Hosting, you can serve a scalable and high-performing copy of your WordPress blog!', 'baqend') ?></p>
            <p>
              <?php if ($hosting_enabled): ?>
                <?php _e('Last hosting:', 'baqend') ?>
                <?php if ($hosting_time !== null): ?>
                  <span><?php echo date_i18n(get_option('date_format'), strtotime($hosting_time)) ?></span>
                <?php else: ?>
                  <span class="disabled"><?php _e('never', 'baqend') ?></span>
                <?php endif; ?>
              <?php else: ?>
                <span><?php _e('<span class="disabled">Hosting is disabled.</span><br>You can enable it in Account settings.', 'baqend') ?></span>
              <?php endif; ?>
            </p>
          </a>
        </li>
      </ul>

      <?php if ($stats): ?>
        <ul class="statistics">
          <li>
            <span class="statistics-number"><?php echo size_format($stats->getDownload()); ?></span>
            <span class="statistics-caption"><? _e('Outgoing Data', 'baqend') ?></span>
          </li>
          <li>
            <span class="statistics-number"><?php echo $stats->getRequests(); ?></span>
            <span class="statistics-caption"><? _e('Requests', 'baqend') ?></span>
          </li>
        </ul>
      <?php endif; ?>
    </div>
  <?php endif; ?>
  <br class="clear">
</div>
