<?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>

<div class="admin-menu-form">
  <div class="admin-menu-options">
    <?php
    $swpanel_ai_items = [
      [
        'label' => __('Reset site configuration', 'swpanel-ai'),
        'link'  => admin_url('admin.php?page=swpanel_ai_concept'),
        'icon'  => "reset.svg",
        'alt'   => 'Reset Icon'
      ],
    ];

    if ($license_data == '1'):
      foreach ($swpanel_ai_items as $swpanel_ai_item): ?>
        <a href="<?php echo esc_url($swpanel_ai_item['link']); ?>" class="blue-button-icon">
          <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . '../assets/img/' . esc_attr($swpanel_ai_item['icon'])); ?>" alt="<?php echo esc_attr($swpanel_ai_item['alt']); ?>">
          <?php echo esc_html($swpanel_ai_item['label']); ?>
        </a>
      <?php endforeach;
    elseif ($license_data == '2'):
    else: ?>
      <div class="error-message">
        <div class="icon-message">
            <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . '../assets/img/box_error.svg');?>">
        </div>
        <div class="content-message">
            <h1><?php esc_html_e('License Error', 'swpanel-ai'); ?></h1>
            <p><?php esc_html_e('No valid license token found. Please add or update your token to continue.', 'swpanel-ai'); ?></p>
        </div>
      </div>
    <?php endif; ?>
      <a href="<?php echo esc_url(admin_url('admin.php?page=swpanel_ai_token')); ?>" class="blue-button-icon">
        <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . '../assets/img/token.svg'); ?>" alt="<?php echo esc_attr('Token Icon'); ?>">
        <?php esc_html_e('Add license token', 'swpanel-ai'); ?>
      </a>
  </div>
</div>
