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

<?php if (!empty($product_statuses) && is_array($product_statuses) && !empty($product_counts_by_status) && is_array($product_counts_by_status)) : ?>
    <ul>
        <li><a href="javascript:;" data-status="all" class="iwbvel-bulk-edit-status-filter-item all"><?php esc_html_e('All', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?> (<?php echo isset($product_counts_by_status['all']) ? intval($product_counts_by_status['all']) : 0 ?>)</a></li>
        <?php foreach ($product_statuses as $iwbvel_status_key => $iwbvel_status_label) : ?>
            <?php if (isset($product_counts_by_status[$iwbvel_status_key])) : ?>
                <li><a href="javascript:;" data-status="<?php echo esc_attr($iwbvel_status_key); ?>" class="iwbvel-bulk-edit-status-filter-item <?php echo esc_attr($iwbvel_status_key); ?>"><?php echo esc_html($iwbvel_status_label . ' (' . $product_counts_by_status[$iwbvel_status_key] . ')'); ?></a></li>
            <?php endif; ?>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>