<?php
  defined('ABSPATH') || die('No direct access.');
?>

<div class="swpanel-header-menu">
  <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . "../assets/img/logo.svg");?>" alt="SWPanel Logo">
</div>

<form class="token-form" method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>">
  <div class="token-block">
    <?php wp_nonce_field('swpanel_ai_token'); ?>
    <input type="hidden" name="action" value="swpanel_ai_token_form">

    <label for="swpanel_ai_license_token">
      <?php echo esc_html(__('Enter License Token', 'swpanel-ai')); ?>
    </label><br>

    <input type="text" id="swpanel_ai_license_token" name="swpanel_ai_license_token" class="regular-text" placeholder="<?php esc_html_e( 'Token', 'swpanel-ai' ); ?>">
    <input type="text" id="swpanel_ai_license_secret" name="swpanel_ai_license_secret" class="regular-text" placeholder="<?php esc_html_e( 'Secret Key', 'swpanel-ai' ); ?>">
  </div>

  <div class="token-buttons">
    <button type="button" id="back-button" class="blue-button" onclick="window.location.href='<?php echo esc_url(admin_url('admin.php?page=swpanel_ai')); ?>'">
        <?php esc_html_e('Back', 'swpanel-ai');?>
    </button>
    <button type="submit" id="continue-button" class="green-button">
        <?php esc_html_e('Add', 'swpanel-ai'); ?>
    </button>
  </div>
</form>
