<?php
$lang = stb_lang();

$login_label_url = $lang==='fa' ? 'https://crm.stbbrokers.com/fa':'https://crm.stbbrokers.com/';
$register_label_url = $lang==='fa' ? 'https://crm.stbbrokers.com/fa/register':'https://crm.stbbrokers.com/register/';
?>
<div class="stb-nav-inner">
    <a href="<?php echo esc_url(home_url('/')); ?>" class="stb-logo">
        <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/logo.png" alt="STB Provider">
    </a>
    <nav class="stb-nav" aria-label="Main navigation">
        <!-- Navigation will be rendered here -->
        <?php wp_nav_menu(['theme_location' => $lang === 'fa' || $lang === 'ar' ? 'primary-rtl' : 'primary', 'container' => false, 'menu_class' => 'stb-nav__list']); ?>
    </nav>
    <div class="stb-nav__actions">
        <a href="<?php echo esc_html($login_label_url);?>" class="stb-btn stb-btn--ghost">
            <?php echo $lang === 'fa' ? 'ورود' : ($lang === 'ar' ? 'دخول' : 'Login'); ?>
        </a>
        <a href="<?php echo esc_html($register_label_url);?>" class="stb-btn stb-btn--primary">
            <?php echo $lang === 'fa' ? 'ثبت‌نام' : ($lang === 'ar' ? 'تسجيل' : 'Register'); ?>
        </a>
    </div>
</div>
