<?php

if ( !defined( 'ABSPATH' ) ) {
    exit;
}

?><?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
$tooltip_attr = '';

if ( $view_data[ 'tooltip' ] ) {

    $tooltip_attr = ' title="' . wc_sanitize_tooltip( $view_data[ 'tooltip' ] ) . '"';
}

$allowed_html = Pricely_Main::get_instance()->get_allow_html();
// phpcs:enable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
?>
<div class="pricely_cart_item_prices"<?php echo wp_kses( $tooltip_attr, $allowed_html ); ?>>
    <?php
    foreach ( $view_data[ 'prices' ] as $price_data ) {// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
        ?>
        <div class="pricely_cart_item_prices_row">
            <div class="prly_cart_item_prices_col_price">
                <?php echo wp_kses( wc_price( $price_data[ 'new_price' ] ), $allowed_html ); ?>
            </div>
            <?php
            if ( false !== $price_data[ 'qty' ] ) {
                ?>
                <div class="prly_cart_item_prices_col_qty">
                    &times;<span><?php echo esc_html( $price_data[ 'qty' ] ); ?></span>
                </div>
                <?php
            }
            ?>
        </div>
        <?php
    }
    ?>
</div>