<?php
/**
 * Social media links block: outputs icons and links for available social profiles
 */
?>

<div class="social-media">

    <?php $facebook = get_field('facebook_url', 'option'); if (!empty($facebook)): ?>
    <a class="facebook" href="<?php echo esc_url($facebook); ?>" target="_blank" rel="noopener">
        <i class="fab fa-facebook-f"></i>
    </a>
    <?php endif; ?>

    <?php $youtube = get_field('youtube_url', 'option'); if (!empty($youtube)): ?>
    <a class="youtube" href="<?php echo esc_url($youtube); ?>" target="_blank" rel="noopener">
        <i class="fab fa-youtube"></i>
    </a>
    <?php endif; ?>

    <?php $instagram = get_field('instagram_url', 'option'); if (!empty($instagram)): ?>
    <a class="instagram" href="<?php echo esc_url($instagram); ?>" target="_blank" rel="noopener">
        <i class="fab fa-instagram"></i>
    </a>
    <?php endif; ?>

    <?php $spotify = get_field('spotify_url', 'option'); if (!empty($spotify)): ?>
    <a class="spotify" href="<?php echo esc_url($spotify); ?>" target="_blank" rel="noopener">
        <i class="fab fa-spotify"></i>
    </a>
    <?php endif; ?>

    <?php $tiktok = get_field('tiktok_url', 'option'); if (!empty($tiktok)): ?>
    <a class="tiktok" href="<?php echo esc_url($tiktok); ?>" target="_blank" rel="noopener">
        <i class="fab fa-tiktok"></i>
    </a>
    <?php endif; ?>
</div>
<!--/.social-media-->