<?php
/* @var array $args */
$mhUser = $args['user'] ?? null;
if (!$mhUser instanceof \Tangibledesign\Framework\Models\User\User || empty($mhUser->getPhone())) {
    return;
}
?>
<div class="myhome-user-elements__phone">
    <div class="myhome-user-elements__phone-icon">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
            <!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
            <path d="M16 64C16 28.7 44.7 0 80 0H304c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64V64zM224 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM304 64H80V384H304V64z"/>
        </svg>
    </div>

    <a
            class="myhome-user-elements__phone-text"
            href="tel:<?php echo esc_attr($mhUser->getPhoneUrl()); ?>"
    >
        <?php echo esc_html($mhUser->getPhone()); ?>
    </a>
</div>