<?php
/**
 * Displays the site header.
 *
 * @package BlogBull
 */
do_action('blogbull_before_header'); ?>

<?php
$enable_header_advertisement = blogbull_get_option('enable_header_advertisement');
$header_advert_image = blogbull_get_option('header_advert_image');
$header_advert_image_url = blogbull_get_option('header_advert_image_url');
if ($enable_header_advertisement) { ?>
    <div class="wpi-header-promote header-promote-bg">
        <a href="<?php echo esc_url($header_advert_image_url); ?>" class="wpi-promote-center" target="_blank">
            <img src="<?php echo esc_url($header_advert_image); ?>">
        </a>
    </div>
<?php } ?>
<?php
if (blogbull_get_option('enable_top_bar', true)) :
    get_template_part('template-parts/header/topbar');
endif;
?>

<?php

$select_header_layout_style = blogbull_get_option('select_header_layout_style');

switch ($select_header_layout_style) {
    case 'header_style_1':
        get_template_part('template-parts/header/styles/style-1');
        break;
    case 'header_style_2':
        get_template_part('template-parts/header/styles/style-2');
        break;
    case 'header_style_3':
        get_template_part('template-parts/header/styles/style-3');
        break;
    default:
        return;
}


do_action('blogbull_after_header');