<?php
/**
 * Module Settings View.
 *
 * Displays the settings panel for a single module, including title and custom content
 * rendered by the module itself (via render_settings_view()).
 *
 * @package Ilabs\Firevert\Core\Views\Layouts
 *
 * @var array                                        $groups      Registered settings groups.
 * @var string                                       $module_slug The slug of the current module.
 * @var \Ilabs\Firevert\Core\ModuleInterface|null    $module      The active module instance, if available.
 */

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

<hr />
<h2 class="firevert-module-settings-title">
	<a href="?page=firevert&tab=modules" class="firevert-back-button">←</a>
	<?php echo esc_html( $groups[ $module_slug ]['title'] ?? $module_slug ); ?>
</h2>

<?php
if ( $module && method_exists( $module, 'render_settings_view' ) ) {
	$module->render_settings_view();
}
?>
