<?php
/**
 * Settings Tabs View.
 *
 * Renders top-level navigation tabs for global settings pages.
 *
 * @package Ilabs\Firevert\Core\Views\Layouts
 *
 * @var array  $groups      Registered setting groups (may be unused here).
 * @var string $active_tab  Currently selected tab slug.
 */

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

use Ilabs\Firevert\Core\Settings\Registry\SettingsRegistry;

/**
 * Get from DI container.
 *
 * @var SettingsRegistry $settings_registry
 */
$settings_registry = firevert_container()->get( 'settings_registry' );
?>
<h2 class="nav-tab-wrapper">
	<?php foreach ( $settings_registry->get_static_tabs() as $slug => $label ) : ?>
		<?php $tab_class = ( $slug === $active_tab ) ? 'nav-tab nav-tab-active' : 'nav-tab'; ?>
		<a href="?page=firevert&tab=<?php echo esc_attr( $slug ); ?>" class="<?php echo esc_attr( $tab_class ); ?>">
			<?php echo esc_html( $label ); ?>
		</a>
	<?php endforeach; ?>
</h2>
