<?php

/**
 * Status tab – Logging.
 *
 * @package northmill-online-shared
 */
declare (strict_types=1);
namespace Northmill_Online_Shared_Sync;

/**
 * View parameters.
 *
 * @var array $params
 */
use Northmill_Online_Shared_Sync\Northmill_Online_Shared\Modules\Loggers\Log_Level_Enum;
\defined('ABSPATH') || exit;
?>
<h2><?php 
\esc_html_e('Logging', 'northmill-online-shared');
?></h2>
<table class="nmf-sync-table">
	<thead>
		<tr>
			<th><?php 
\esc_html_e('Log level', 'northmill-online-shared');
?></th>
			<th><?php 
\esc_html_e('Test', 'northmill-online-shared');
?></th>
		</tr>
	</thead>
	<tbody>
	<?php 
foreach ($params['log_levels'] as $log_level) {
    /**
     * Log level
     *
     * @var Log_Level_Enum $log_level
     */
    echo '<tr>';
    echo '<td>' . \esc_html($log_level->name) . '</td>';
    echo '<td><button class="nm-status-logging-test" data-level="' . \esc_attr($log_level->value) . '">' . \esc_html__('Create test log entry', 'northmill-online-shared') . '</button></td>';
    echo '</tr>';
}
?>
	</tbody>
</table>
<?php 
