<?php
    $widget->add_render_attribute( 'counter', [
        'class' => 'pxl-number--value '.$settings['effect'],
        'data-duration' => $settings['duration'],
        'data-startnumber' => $settings['starting_number'],
        'data-endnumber' => $settings['ending_number'],
        'data-to-value' => $settings['ending_number'],
        'data-delimiter' => $settings['thousand_separator_char'],
    ]); 
?>

<div class="pxl-counter pxl-counter7">
    <div class="pxl-item--container">
        <div class="pxl-item--inner">
            <div class="pxl-item--number">
                <?php if(!empty($settings['prefix'])) : ?>
                    <span class="pxl-item--prefix"><?php pxl_print_html($settings['prefix'].'0'); ?></span>
                <?php endif; ?>
                <span 
                    <?php pxl_print_html($widget->get_render_attribute_string( 'counter' )); ?>>
                    <?php echo esc_html($settings['starting_number']); ?>
                </span>
                <?php if(!empty($settings['suffix'])) : ?>
                    <span class="pxl-item--suffix"><?php pxl_print_html($settings['suffix']); ?></span>
                <?php endif; ?>
            </div>
            <?php if(!empty($settings['title'])) : ?>
                <div class="pxl-item--title"><?php pxl_print_html($settings['title']); ?></div>
            <?php endif; ?>
        </div>
    </div>
</div>