<?php
/**
 * @package Helix Ultimate Framework
 * @author JoomShaper https://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2018 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

defined ('_JEXEC') or die();

$data = $displayData;
$offcanvs_position = $displayData->params->get('offcanvas_position', 'right');

$feature_folder_path     = JPATH_THEMES . '/' . $data->template->template . '/features/';

include_once $feature_folder_path.'logo.php';
include_once $feature_folder_path.'social.php';
include_once $feature_folder_path.'contact.php';
include_once $feature_folder_path.'menu.php';

$output  = '';

$output  = '<header id="header" class="header header-style2">';
    $output .= '<div class="header-top2 clearfix">';
        $output .= '<div class="container-fluid">';
            $output .= '<div class="top-header2 clearfix">';
                $output .= '<div class="row">';
                    $output .= '<div id="sidebar-top2" class="col-lg-6 sidebar-top-right d-inline-flex clearfix">';
                    $social = new HelixUltimateFeatureSocial($data->params);
                    if(isset($social->load_pos) && $social->load_pos == 'before')
                    {
                        $output .= $social->renderFeature();
                        $output .= '<jdoc:include type="modules" name="top3" style="sp_xhtml" />';
                    }
                    else
                    {
                        $output .= '<jdoc:include type="modules" name="top3" style="sp_xhtml" />';
                        $output .= $social->renderFeature();
                    }    
                    
                    $output .= '</div>';
                    $output .= '<div class="right-header2 text-right col-lg-6">';
                    $contact = new HelixUltimateFeatureContact($data->params);
                    if(isset($contact->load_pos) && $contact->load_pos == 'before')
                    {
                        $output .= $contact->renderFeature();
                        $output .= '<jdoc:include type="modules" name="top2" style="sp_xhtml" />';
                    }
                    else
                    {
                        $output .= '<jdoc:include type="modules" name="top2" style="sp_xhtml" />';
                        $output .= $contact->renderFeature();
                    }
                    $output .= '</div>';
                $output .= '</div>';                    
            $output .= '</div>';
        $output .= '</div>';
    $output .= '</div>';


    $output .= '<div class="header-bottom clearfix">';
        $output .= '<div class="container-fluid">';
        $output .= '<div class="row">';
            $output .= '<div class="header-logo pull-left col-lg-3">';
$logo    = new HelixUltimateFeatureLogo($data->params);
if(isset($logo->load_pos) && $logo->load_pos == 'before')
{
    $output .= $logo->renderFeature();
    $output .= '<jdoc:include type="modules" name="logo" style="sp_xhtml" />';
}
else
{
    $output .= '<jdoc:include type="modules" name="logo" style="sp_xhtml" />';
    $output .= $logo->renderFeature();
}
            $output .= '</div>';

            $output .= '<div class="header-right text-right col-lg-9">';
                //$output .= '<div class="container">';
                    $output .= '<div id="main-menu" class="main-menu pull-left clearfix">';
                        $menu    = new HelixUltimateFeatureMenu($data->params);
                        if(isset($menu->load_pos) && $menu->load_pos == 'before')
                        {
                            $output .= $menu->renderFeature();
                            $output .= '<jdoc:include type="modules" name="menu" style="sp_xhtml" />';
                        }
                        else
                        {
                            $output .= '<jdoc:include type="modules" name="menu" style="sp_xhtml" />';
                            $output .= $menu->renderFeature();
                        }
                    $output .= '</div>';
                    $output .= '<div class="sidebar-header-right pull-right clearfix">';
                        $output .= '<div class="search-cate pull-right">';
                        $output .= '<jdoc:include type="modules" name="search" style="sp_xhtml" />';
                        $output .= '</div>';
                    $output .= '</div>';
                //$output .= '</div>';                
            $output .= '</div>';
        $output .= '</div>';    
        $output .= '</div>';
    $output .= '</div>';

$output .= '</header>';

echo $output;