<?php
/* @var $args array */
$mhAttribute = $args['attribute'] ?? null;
if (empty($mhAttribute) || empty($mhAttribute['value'])) {
    return;
}
?>
<div class="myhome-attribute">
    <?php if (!empty($mhAttribute['icon']['value'])) : ?>
        <span class="myhome-attribute__icon">
            <?php tdf_render_icon($mhAttribute['icon']); ?>
        </span>
    <?php endif; ?>

    <?php if (!empty($mhAttribute['text_before'])) : ?>
        <span class="myhome-attribute__text-before">
            <?php echo esc_html($mhAttribute['text_before']); ?>
        </span>
    <?php endif; ?>

    <span class="myhome-attribute__value">
        <?php echo esc_html($mhAttribute['value']); ?>
    </span>

    <?php if (!empty($mhAttribute['text_after'])) : ?>
        <span class="myhome-attribute__text-after">
            <?php echo esc_html($mhAttribute['text_after']); ?>
        </span>
    <?php endif; ?>
</div>