<?php
// Template file for Header Sidebar Layout 3
if (!defined('ABSPATH')) {
	exit;
}
?>

<!-- ================= Sidebar area start here ================= -->
<div class="offcanvas v2 offcanvas-end" tabindex="-1" id="<?php echo esc_attr($offcanvas_id); ?>" aria-hidden="true">
    <div class="offcanvas-header">
        <?php if (!empty($offcanvas_logo)): ?>
        <h5 class="offcanvas-title wpr-el-logo">
            <a href="<?php echo esc_url(home_url('/')); ?>" class="header__logo">
                <img src="<?php echo esc_url($offcanvas_logo); ?>" alt="<?php echo esc_attr($offcanvas_logo_alt ?? ''); ?>" />
            </a>
        </h5>
        <?php endif; ?>

        <button
          type="button"
          class="hamburger-menu-close v2 offcanvas__close-btn"
          data-offcanvas-close="<?php echo esc_attr($offcanvas_id); ?>"
          aria-label="Close">
            <i class="fa-solid fa-xmark"></i>
        </button>
    </div>
    <div class="offcanvas-menu">
        <div class="unlockafe-offcanvas-nav">
            <?php if (!empty($offcanvas_menu_markup)) : ?>
                <?php echo $offcanvas_menu_markup; ?>
            <?php else : ?>
                <p class="unlockafe-offcanvas-nav--empty"><?php echo esc_html($offcanvas_menu_notice); ?></p>
            <?php endif; ?>
        </div>
    </div>
    <div class="offcanvas-body">
        <?php if (!empty($settings['wpr_social_repeater'])): ?>
        <?php foreach ($settings['wpr_social_repeater'] as $key => $item): ?>
        <?php if (!empty($item['show_social'])): ?>
        <div class="mobile-menu-social-media wpr-header-social">
            <ul>
                <?php if (!empty($item['web_title'])): ?>  
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['web_title']); ?>">
                    <i class="fas fa-globe"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['phone_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['phone_title']); ?>"><i class="fas fa-phone"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['facebook_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['facebook_title']); ?>"><i class="fa-brands fa-facebook-f"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['twitter_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['twitter_title']); ?>">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="my-svg">
                      <path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/>
                    </svg>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['linkedin_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['linkedin_title']); ?>"><i class="fa-brands fa-linkedin-in"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['instagram_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['instagram_title']); ?>"><i class="fab fa-instagram"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['youtube_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['youtube_title']); ?>"><i class="fa-brands fa-youtube"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['googleplus_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['googleplus_title']); ?>"><i class="fab fa-google-plus-g"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['flickr_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['flickr_title']); ?>"><i class="fab fa-flickr"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['vimeo_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['vimeo_title']); ?>"><i class="fab fa-vimeo-v"></i>
                </a></li>
                <?php endif; ?>
                <?php if (!empty($item['behance_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['behance_title']); ?>"><i class="fab fa-behance"></i></a></li>
                <?php endif; ?>
                <?php if (!empty($item['dribble_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['dribble_title']); ?>"><i class="fab fa-dribbble"></i></a></li>
                <?php endif; ?>
                <?php if (!empty($item['pinterest_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['pinterest_title']); ?>"><i class="fab fa-pinterest-p"></i></a></li>
                <?php endif; ?>
                <?php if (!empty($item['gitub_title'])): ?>
                <li><a class="wpr-el-team-social" href="<?php echo esc_url($item['gitub_title']); ?>"><i class="fab fa-github"></i>
                </a></li>
                <?php endif; ?>
            </ul>
        </div>
        <?php endif; ?>
        <?php endforeach; ?>
        <?php endif; ?>

        <?php if (!empty($settings['offcanvas_description'])): ?>
        <p class="wpr-offcanvas-desc info">
            <?php echo wp_kses_post($settings['offcanvas_description']); ?>
        </p>
        <?php endif; ?>

        <?php if (!empty($settings['offcanvas_copyright'])): ?>
        <div class="orvio__mobile-menu-copyright">
            <p class="orvio__mobile-menu-copyright-text wpr-offcanvas-copyright">
                <?php echo wp_kses_post($settings['offcanvas_copyright']); ?>
            </p>
        </div>
        <?php endif; ?>
    </div>
</div>
<!-- ================= Sidebar area end here ================= -->

