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

?>
<div class="rivax-promo-box <?php echo esc_attr($settings['promo_effect']); ?>">
    <div class="image-wrapper">
        <?php echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'promo_image_size', 'promo_image' ); ?>
    </div>
    <div class="content-wrapper rivax-position-cover">
        <h5 class="promo-title"><?php echo esc_html($settings['promo_heading']); ?></h5>
        <?php echo wpautop(wp_strip_all_tags($settings['promo_content'])); ?>
    </div>
    <?php
    if ( ! empty( $settings['promo_link']['url'] ) ) {
        $this->add_link_attributes( 'promo_link', $settings['promo_link'] );
        $this->add_render_attribute('promo_link', 'class', 'rivax-position-cover');

        echo '<a ';
        $this->print_render_attribute_string( 'promo_link' );
        echo '></a>';
    }
    ?>
</div>