<?php

if ( !defined( 'ABSPATH' ) ) {
    exit;
}
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
$pipline_view_data = Pricely_View_Data_Label::get_instance();

$label_data = $pipline_view_data->get_data( $view_data );

if ( !$label_data ) {

    $view_rendered = false;

    return;
}

$allow_html = Pricely_Main::get_instance()->get_allow_html();
// phpcs:enable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
?><div class="pricely-container">
    <div class="pricely-label <?php echo esc_attr( $label_data[ 'ui_css_class' ] ); ?>">
        <div class="prly-lbl-inner">
            <?php
            if ( $label_data[ 'labels' ] ) {
                foreach ( $label_data[ 'labels' ] as $label_text ) {// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
                    ?>
                    <span class="prly-lbl-text"><?php echo wp_kses( $label_text, $allow_html ); ?></span>
                    <?php
                }
            }
            ?>
        </div>
    </div>
</div>

