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

<table id="iwbvel-variations-table">
    <thead>
        <tr>
            <th>
                <div class="iwbvel-table-item-selector-container">
                    <input type="checkbox" class="iwbvel-variations-table-item-selector-checkbox" value="visible">
                    <div class="iwbvel-variations-table-item-selector" title="Select All">
                        <ul>
                            <li>
                                <label>
                                    <input type="checkbox" value="all" class="iwbvel-variations-table-select-all-button">
                                    <span><?php esc_html_e('Select All', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></span>
                                </label>
                            </li>
                            <li>
                                <label>
                                    <input type="checkbox" value="visible" class="iwbvel-variations-table-select-all-button">
                                    <span><?php esc_html_e('Select Visible', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></span>
                                </label>
                            </li>
                        </ul>
                    </div>
                </div>
            </th>
            <th style="min-width: 35px;"><?php esc_html_e('ID', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
            <th> </th>
            <th style="text-align: left;"><?php esc_html_e('Combinations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
            <th><?php esc_html_e('Regular price', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
            <th><?php esc_html_e('Sale price', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
            <th><?php esc_html_e('Stock QTY', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
            <th title="<?php esc_attr_e('Enable', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"><i class="iwbvel-icon-check-circle"></i></th>
            <th title="<?php esc_attr_e('Default', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"><i class="iwbvel-icon-pocket"></i></th>
        </tr>
    </thead>
    <tbody>
        <?php
        if (!empty($variations)) {
            foreach ($variations as $iwbvel_variation) {
                include "variations-table-row.php";
            }
        } else {
            echo '<td colspan="100%">No data available</td>';
        }
        ?>
    </tbody>
</table>

<?php
include_once IWBVEL_VIEWS_DIR . "variations/add_variations/variation-attributes-edit-modal.php";
include_once IWBVEL_VIEWS_DIR . "variations/add_variations/variation-thumbnail-modal.php";
include_once IWBVEL_VIEWS_DIR . "variations/add_variations/all-variations-modal.php";
?>