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

<div class="iwbvel-alert iwbvel-alert-default" style="border-radius: 4px; font-weight: 600;">
    <span>
        <i class="iwbvel-icon-info1"></i>
        <?php esc_html_e('All of your changes will be saved automatically. e.g. Add Variations, Edit Variations.', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
    </span>
</div>

<div class="iwbvel-alert iwbvel-alert-warning iwbvel-variations-multiple-products-alert" style="display: none; border-radius: 4px; font-weight: 600;">
    <span>
        <i class="iwbvel-icon-info1"></i>
        <?php esc_html_e('Note) If you have selected several products, use the "Attach" tab to edit the attributes and variations, otherwise, all current attributes and variations will be replaced with new ones.', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
    </span>
</div>

<div class="iwbvel-variations-bulk-edit-add-variation-left">
    <div class="iwbvel-combine-attributes">
        <div class="iwbvel-combine-attributes-items-container">
            <ul class="iwbvel-combine-attributes-items"></ul>
            <span class="iwbvel-combine-attributes-items-description">Combine several attributes, example: "Size: all", "Color: red".</span>
        </div>
        <div class="iwbvel-combine-attributes-button">
            <button type="button" class="iwbvel-combine-attributes-generate-button"><?php esc_html_e('Generate', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?> <i class="iwbvel-icon-chevron-down"></i></button>
            <div class="single-product">
                <div class="iwbvel-combine-attributes-sub-buttons">
                    <button type="button" class="iwbvel-variations-all-combinations-button" data-type="this-product" data-toggle="modal" data-target="#iwbvel-variations-all-variations-modal"><?php esc_html_e('All Variations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                    <button type="button" class="iwbvel-variations-individual-variation-button" data-type="this-product" data-toggle="modal" data-target="#iwbvel-variations-individual-variation-modal"><?php esc_html_e('Individual Variation', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                </div>
            </div>
            <div class="multiple-products">
                <div class="iwbvel-combine-attributes-sub-buttons">
                    <button type="button" class="iwbvel-variations-all-combinations-button" data-type="this-product" data-toggle="modal" data-target="#iwbvel-variations-all-variations-modal"><?php esc_html_e('All Variations (This product)', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                    <button type="button" class="iwbvel-variations-individual-variation-button" data-type="this-product" data-toggle="modal" data-target="#iwbvel-variations-individual-variation-modal"><?php esc_html_e('Individual Variation (This product)', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                    <button type="button" class="iwbvel-variations-all-combinations-button" data-type="all-products" data-toggle="modal" data-target="#iwbvel-variations-all-variations-modal"><?php esc_html_e('All Variations (All products)', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                    <button type="button" class="iwbvel-variations-individual-variation-button" data-type="all-products" data-toggle="modal" data-target="#iwbvel-variations-individual-variation-modal"><?php esc_html_e('Individual Variation (All products)', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="iwbvel-variations-bulk-actions">
        <div class="iwbvel-variations-bulk-actions-button" title="<?php esc_attr_e('Bulk Actions', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"><i class="iwbvel-icon-edit-2"></i>
            <div class="iwbvel-variations-bulk-actions-sub-buttons">
                <button type="button" class="iwbvel-variations-bulk-actions-selected-button"><?php esc_html_e('Selected Variations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
                <button type="button" class="iwbvel-variations-bulk-actions-all-button"><?php esc_html_e('All Variations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?> <span class=iwbvel-variations-from-all-products-label"> <?php esc_html_e('(of Selected Products)', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></span></button>
            </div>
        </div>
        <button type="button" class="iwbvel-variations-reload-table" title="<?php esc_attr_e('Reload Variations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"><i class="iwbvel-icon-refresh-cw"></i></button>
        <button type="button" class="iwbvel-variations-table-delete-button" title="<?php esc_attr_e('Delete Variations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"><i class="iwbvel-icon-trash-2"></i></button>
        <a href="#" target="_blank" class="iwbvel-variations-wc-product-edit-button" title="<?php esc_attr_e('Edit via woocommerce', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"><i class="iwbvel-icon-edit"></i></a>
    </div>

    <div class="iwbvel-variations-product-selector">
        <select id="iwbvel-variations-variable-products-selector" class="iwbvel-variations-variable-products-selector" title="<?php esc_attr_e('Variable product', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"></select>
        <select id="iwbvel-variations-variable-products-selector-ajax" class="iwbvel-variations-variable-products-selector" title="<?php esc_attr_e('Variable product', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>"></select>
    </div>

    <div class="iwbvel-variations-list">
        <?php include "variations-table.php"; ?>
        <div class="iwbvel-variations-pagination"></div>
        <div class="iwbvel-variations-go-to-page">
            <input type="number" id="iwbvel-variations-go-to-page" min="1" max="" placeholder="<?php esc_attr_e('Go to page', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>">
        </div>
        <div class="iwbvel-variations-table-loading">
            <p><img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading-2.gif'); ?>" width="24"></p>
        </div>
    </div>
</div>

<div class="iwbvel-variations-bulk-edit-add-variation-right">
    <div class="iwbvel-product-attributes-list">
        <div class="iwbvel-variations-attributes-top">
            <h3><?php esc_html_e('Attributes', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></h3>
        </div>
        <div class="iwbvel-product-attribute-items">
            <div class="iwbvel-product-attribute-items-loading">
                <img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading-2.gif'); ?>" width="20" height="20" alt="Loading ...">
            </div>
        </div>
    </div>
</div>

<div class="iwbvel-variation-bulk-edit-loading">
    <p><img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading-2.gif'); ?>" width="36"></p>
</div>