<?php
$logo_light = st()->get_option('hotel_alone_logo');
$st_topbar_location = st()->get_option('st_hotel_alone_topbar_location');
$st_topbar_contact_number = st()->get_option('st_hotel_alone_topbar_contact_number');
$st_topbar_email_address = st()->get_option('st_hotel_alone_topbar_email_address');
/**
 * Custom Meta Page
 */
if(is_archive() || is_search()){

}else{
    $custom_header_page = get_post_meta(get_the_ID(),'custom_header_page',true);
    if($custom_header_page == 'on'){
        $st_topbar_location = get_post_meta(get_the_ID(),'st_topbar_location',true);
        $st_topbar_contact_number = get_post_meta(get_the_ID(),'st_topbar_contact_number',true);
        $st_topbar_email_address = get_post_meta(get_the_ID(),'st_topbar_email_address',true);
    }
    $custom_logo = get_post_meta(get_the_ID(),'custom_logo',true);
    if($custom_logo == 'on'){
        $logo_light = get_post_meta(get_the_ID(),'logo_light',true);
    }
}
?>
<div class="topbar-content top-bar-style-4" data-offset="0">
    <div class="background-scroll"></div>
    <div class="control-left">
        <div class="option-item">
            <div class="option-mid">
                <span class="btn-book"><?php esc_html_e("RESERVATION",ST_TEXTDOMAIN) ?></span>
            </div>
            <div class="form-search-position-left">
                <div class="form-search-content">
                    <div class="form-search-content-mid">
                        <?php echo st_hotel_alone_load_view( 'header/top-bar/nav-item-topbar/form-book', false, [ 'picker_style' => 'fixed' ] ) ?>
                        <div class="info-form-book">
                            <div class="title">
                                <?php echo st()->get_option( 'st_hotel_alone_topbar_desc_search_form' ); ?>
                            </div>
                            <?php  if(!empty($st_topbar_contact_number)){?>
                                <div class="phone">
                                    <i class="fa fa-phone"></i>
                                    <?php echo esc_html($st_topbar_contact_number) ?>
                                </div>
                            <?php } ?>
                            <?php  if(!empty($st_topbar_email_address)){?>
                                <div class="email">
                                    <i class="fa fa-envelope-o" aria-hidden="true"></i>
                                    <?php echo esc_html($st_topbar_email_address) ?>
                                </div>
                            <?php } ?>
                        </div>
                        <div class="btn-close">
                            x
                        </div>
                        <div class="background_booking">
                            <?php esc_html_e("Booking",ST_TEXTDOMAIN) ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="control-right">
        <div class="option-item">
            <div class="option-mid">
                <?php echo st_hotel_alone_load_view('header/top-bar/nav-item-topbar/account', false); ?>
            </div>
        </div>
        <div class="option-item">
            <div class="option-mid">
                <?php echo st_hotel_alone_load_view('header/top-bar/nav-item-topbar/language', false); ?>
            </div>
        </div>
        <div class="option-item">
            <div class="option-mid">
                <?php echo st_hotel_alone_load_view('header/top-bar/nav-item-topbar/weather', false, array('st_topbar_location' => $st_topbar_location)); ?>
            </div>
        </div>
    </div>
</div>