<?php

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

/**
 * View parameters.
 *
 * @var array $params
 */
\defined('ABSPATH') || exit;
?>
<h2><?php 
\esc_html_e('Main plugin settings', 'northmill-online-shared');
?></h2>
<table class="nmf-sync-table">
	<thead>
		<tr>
			<th><?php 
\esc_html_e('Settings key', 'northmill-online-shared');
?></th>
			<th><?php 
\esc_html_e('Settings value', 'northmill-online-shared');
?></th>
		</tr>
	</thead>
	<tbody>
	<?php 
foreach ($params['main_settings'] as $settings_key => $settings_value) {
    if (\is_array($settings_value)) {
        // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
        $settings_value = \print_r($settings_value, \true);
    }
    echo '<tr>';
    echo '<td>' . \esc_html($settings_key) . '</td>';
    echo '<td>' . \esc_html($settings_value) . '</td>';
    echo '</tr>';
}
?>
	</tbody>
</table>
<?php 
