<?php

use Tangibledesign\MyHome\Widgets\User\UserSocialsWidget;

/* @var UserSocialsWidget $mhCurrentWidget */
global $mhCurrentWidget;

$mhUser = $mhCurrentWidget->getUser();
if (!$mhUser) {
    return;
}
?>
<div class="myhome-social-icons-wrapper">
    <div class="myhome-social-icons">
        <?php if (!empty($mhUser->getFacebookProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getFacebookProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-facebook-f"></i>
            </a>
        <?php endif; ?>

        <?php if (!empty($mhUser->getTwitterProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getTwitterProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-twitter"></i>
            </a>
        <?php endif; ?>

        <?php if (!empty($mhUser->getLinkedInProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getLinkedInProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-linkedin-in"></i>
            </a>
        <?php endif; ?>

        <?php if (!empty($mhUser->getInstagramProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getInstagramProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-instagram"></i>
            </a>
        <?php endif; ?>

        <?php if (!empty($mhUser->getYouTubeProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getYouTubeProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-youtube"></i>
            </a>
        <?php endif; ?>

        <?php if (!empty($mhUser->getTiktokProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getTiktokProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-tiktok"></i>
            </a>
        <?php endif; ?>

        <?php if (!empty($mhUser->getTelegramProfile()))  : ?>
            <a
                    class="myhome-social-icons__icon myhome-social-icon myhome-social-icon--color-1 myhome-social-icon--hover-color-primary"
                    href="<?php echo esc_url($mhUser->getTelegramProfile()); ?>"
                    target="_blank"
            >
                <i class="fab fa-telegram"></i>
            </a>
        <?php endif; ?>
    </div>
</div>