<?php
if ( ! defined('WPINC')) {
    die;
}
?>

<div class="wrap">
    <h2><?php _e('Premmerce Wholesale Pricing for WooCommerce', 'premmerce-price-types') ?></h2>
    <h2 class="nav-tab-wrapper">
        <?php foreach ($tabs as $tab => $name): ?>
            <?php $class = ($tab == $current) ? ' nav-tab-active' : ''; ?>
            <a class='nav-tab<?php echo esc_attr($class) ?>'
               href='?page=premmerce-price-types&tab=<?php echo esc_attr($tab) ?>'><?php echo esc_html($name) ?></a>
        <?php endforeach; ?>
    </h2>
    <?php
    $allowed_tabs = array_keys($tabs);
    if (in_array($current, $allowed_tabs, true)) {
        $file = __DIR__ . "/tabs/{$current}.php";
        if (file_exists($file)) {
            include $file;
        }
    }
    ?>
</div>

