<?php

use Elementor\Utils;

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

list($animate_class, $animation_attr) = tfl_get_animation_atts($settings['widget_animation']);

?>

<div class="tfl-heading-v2 tfl-style1 tfl-align<?php echo $settings['align']; ?> <?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>

    <?php if (!empty($settings['subtitle'])): ?>
        <div class="tfl-subtitle">

            <?php
//            var_dump($settings['prefix_image']);
            if (isset($settings['prefix_image']['url']) && $settings['prefix_image']['url'] != ''){
                echo '<img src="'.$settings['prefix_image']['url'].'" alt="prefix_image">';
            }
            echo esc_html($settings['subtitle']);
            ?>
        </div>
    <?php endif; ?>

    <?php $title_html = '<' . Utils::validate_html_tag($settings['title_tag']) . ' class="tfl-title">' .  wp_kses_post($settings['heading']) . ' </' . Utils::validate_html_tag($settings['title_tag']) . '>';
    echo $title_html;
    ?>


</div><!-- .tfl-heading -->