<?php
/**
 * Template part for displaying a message that posts cannot be found
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package CRT_Builder_With_Elementor
 */
?>
<?php
    $crt_builder_with_elementor_attr_color = '#000;';
    $crt_builder_with_elementor_header_nav_style = get_theme_mod('crt_manage_header_nav_style');
    $crt_builder_with_elementor_header_bg_color = get_theme_mod('crt_manage_header_nav_style_bg_color', 'black');
    $crt_builder_with_elementor_header_bd_color = get_theme_mod('crt_manage_header_nav_style_bd_color', 'black');
    $crt_builder_with_elementor_header_type = get_theme_mod('crt_manage_header_type');
    $crt_builder_with_elementor_header_fullwidth = get_theme_mod('crt_manage_header_nav_full_width', true);
    if($crt_builder_with_elementor_header_nav_style == 'bg-color' && $crt_builder_with_elementor_header_type != 'v3') {
        $crt_builder_with_elementor_attr_color = '#FFF';
    }
    $crt_builder_with_elementor_header_attrs = 'head__nav--'.$crt_builder_with_elementor_header_nav_style . ' head__bg--'.$crt_builder_with_elementor_header_bg_color.' head__bd--'.$crt_builder_with_elementor_header_bd_color;
?>
<?php if(!$crt_builder_with_elementor_header_fullwidth): ?><div class="container"><div class="row align-items-center"><div class="col-12"><?php endif; ?>
    <div class="head__nav <?php echo esc_attr($crt_builder_with_elementor_header_attrs); ?>">
        <nav class="nav__desktop" role="navigation" itemscope itemtype="https://schema.org/SiteNavigationElement">
            <?php
            if ( has_nav_menu( 'primary' ) ) {
                wp_nav_menu(
                    array(
                        'container' => false,
                        'theme_location' => 'primary',
                    )
                );
            } else {
                echo '<ul><li style="color: '.$crt_builder_with_elementor_attr_color.'">'.sprintf(__('Go to <a href="%s">Appearance > Menu</a> to set "Primary Menu"','crt-builder-with-elementor'),get_admin_url('','nav-menus.php')).'</li></ul>';
            }
            ?>
        </nav>
    </div>
<?php if(!$crt_builder_with_elementor_header_fullwidth): ?></div></div></div><?php endif; ?>