<?php
$assets_root_tab2 = plugin_dir_url(__FILE__);
require_once plugin_dir_path(__FILE__) . 'includes/setting_field.php';
// Main tabs array
$tabs = require_once plugin_dir_path(__FILE__) . 'includes/tabs.php';

// Separate form data array keyed by tab identifiers
$form_data = require_once plugin_dir_path(__FILE__) . 'includes/form_data.php';

$active_tab = isset($_GET['tab']) ? $_GET['tab'] : null;
?>

<link href="<?= $assets_root_tab2 ?>style.css?v=<?= ASSETS_VERSION ?>" rel="stylesheet">

<div id="sport-plugin-tab2"
     class="sport-plugin-tab-panel <?php echo isset($_GET['tab']) && $_GET['tab'] === 'sport-plugin-tab2' ? 'active' : ''; ?>">
    <!-- Tab Section -->
    <ul class="sport-plugin-tab-list2">
        <?php foreach ($tabs as $key => $tab): ?>
            <li class="sport-plugin-tab-item2">
                <img
                        class="sport-plugin-tab-image"
                        src="<?php echo plugin_dir_url(__FILE__) . 'assets/images/' . $tab['image']; ?>"
                        alt="<?php echo $tab['alt']; ?>"
                        onclick="openModal(this)"
                />
                <div class="sport-plugin-tab-item-blocktab2">
                    <h3 class="sport-plugin-tab-item-title3"><?php echo $tab['title']; ?></h3>

                </div>
                <span class="sport-plugin-tab-shortcode"><?php echo $tab['shortcode']; ?></span>
            </li>
        <?php endforeach; ?>
    </ul>

    <?php
    require_once plugin_dir_path(__FILE__) . 'includes/functions.php';
    bongdako_layout_assets_admin();
    ?>

</div>

<script src="<?= $assets_root_tab2 ?>common.js?v=<?= ASSETS_VERSION ?>"></script>