<?php
/**
 * Admin settings page wrapper template.
 *
 * Variables in scope (passed by Admin_Settings::render_page()):
 *
 * @var array<int,array{url:string,label:string,class:string}> $tab_links
 * @var callable                                                $render_content  Closure that echoes tab content.
 *
 * @since   1.0.0
 * @package DonationRouter
 */

declare( strict_types=1 );

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

?>
<div class="wrap ador-admin-wrap">
	<h1><?php esc_html_e( 'Donation Router', 'alamin-donation-router' ); ?></h1>

	<nav class="nav-tab-wrapper">
		<?php foreach ( $tab_links as $tab ) : ?>
			<a href="<?php echo esc_url( $tab['url'] ); ?>" class="<?php echo esc_attr( $tab['class'] ); ?>">
				<?php echo esc_html( $tab['label'] ); ?>
			</a>
		<?php endforeach; ?>
	</nav>

	<div class="tab-content">
		<?php ( $render_content )(); ?>
	</div>
</div>
