<?php
/* @var \Tangibledesign\Framework\Widgets\General\SocialShareWidget $mhCurrentWidget */
global $mhCurrentWidget;
?>
<div class="myhome-social-share">
    <?php if ($mhCurrentWidget->showFacebook()) : ?>
        <a
                href="https://www.facebook.com/sharer/sharer.php?u=<?php echo esc_url(tdf_app('current_url')); ?>"
                target="_blank"
                class="myhome-social-share__single myhome-social-share__single--facebook"
        >
            <i class="fab fa-facebook-f"></i>
        </a>
    <?php endif; ?>

    <?php if ($mhCurrentWidget->showTwitter()) : ?>
        <a
                href="https://twitter.com/share?url=<?php echo esc_url(tdf_app('current_url')); ?>"
                target="_blank"
                class="myhome-social-share__single myhome-social-share__single--twitter"
        >
            <i class="fab fa-twitter"></i>
        </a>
    <?php endif; ?>

    <?php if ($mhCurrentWidget->showWhatsApp()) : ?>
        <a
                href="whatsapp://send?text=<?php echo urlencode(tdf_app('current_url')); ?>"
                target="_blank"
                class="myhome-social-share__single myhome-social-share__single--whatsapp"
        >
            <i class="fab fa-whatsapp"></i>
        </a>
    <?php endif; ?>

    <?php if ($mhCurrentWidget->showMessenger()) : ?>
        <a
                href="fb-messenger://share?link=<?php echo urlencode(tdf_app('current_url')); ?>"
                target="_blank"
                class="myhome-social-share__single myhome-social-share__single--messenger"
        >
            <i class="fab fa-facebook-messenger"></i>
        </a>
    <?php endif; ?>
</div>
