<?php
if (!defined('WPINC')) {
    die();
}

use EstatebudConnect\Configs\Icons; ?>
<a class="estatebud-button" name="<?php echo esc_attr($name); ?>" href="<?php echo esc_attr($destination_url); ?>">
    <?php if ($icon_position === 'left'): ?>
        <?php if ($icon):
            echo wp_kses($icon, Icons::get_kses_ruleset());
        endif; ?>
        <div class="estatebud-button-title"><?php echo esc_html($title); ?></div>
    <?php else: ?>
        <div class="estatebud-button-title"><?php echo esc_html($title); ?></div>
        <?php if ($icon):
            echo wp_kses($icon, Icons::get_kses_ruleset());
        endif; ?>
    <?php endif; ?>
</a>