<?php

declare(strict_types=1);

namespace Enot;

if (!defined('ABSPATH')) {
    exit;
}

// phpcs:disable WordPress.Security.NonceVerification.Recommended

$page = isset($_GET['page']) ? \sanitize_text_field(\wp_unslash($_GET['page'])) : '';

?>
<div class="wrap">
    <h1><?php echo \esc_html(ENOT_PLUGIN_NAME) ?></h1>

	<div class="notice notice-info alt is-dismissible">
	    <p><?php
	    	echo \wp_kses(
	    		sprintf(
	    			// translators: 1: The link URL, 2: The link name
	    			\__('All features are available only in the Premium version of the plugin. See <a href="%1$s" target="_blank">%2$s</a>', 'error-monitor-and-notifier'),
			    	\esc_url(\trailingslashit(ENOT_PLUGIN_SITE_URL)),
			    	\esc_html(ENOT_PLUGIN_SITE_URL)
			    ),
			    'post'
			);
	    ?></p>
	</div>

    <nav class="mt-3" style="white-space: nowrap; overflow-x: auto;">
        <ul class="nav-tab-wrapper d-flex">
            <li>
                <a href="<?php echo \esc_attr(\admin_url('admin.php')) ?>?page=enot-settings" class="nav-tab<?php echo $page === ENOT_PLUGIN_ADMIN_MENU_SETTINGS_SLUG ? ' nav-tab-active' : '' ?>"><?php \esc_html_e("Settings", "error-monitor-and-notifier") ?></a>
            </li>
            <li>
                <a href="<?php echo \esc_attr(\admin_url('admin.php')) ?>?page=enot-email" class="nav-tab<?php echo $page === 'enot-email' ? ' nav-tab-active' : '' ?>"><?php \esc_html_e("Email", "error-monitor-and-notifier") ?></a>
            </li>
            <li>
                <a href="<?php echo \esc_attr(\admin_url('admin.php')) ?>?page=enot-telegram" class="nav-tab<?php echo $page === 'enot-telegram' ? ' nav-tab-active' : '' ?>"><?php \esc_html_e("Telegram", "error-monitor-and-notifier") ?></a>
            </li>
            <li>
                <a href="<?php echo \esc_attr(\admin_url('admin.php')) ?>?page=enot-license" class="nav-tab<?php echo $page === 'enot-license' ? ' nav-tab-active' : '' ?>"><?php \esc_html_e("License", "error-monitor-and-notifier") ?></a>
            </li>
        </ul>
    </nav>