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

if (!defined('IWBVE_ACTIVE')):
    include IWBVEL_VIEWS_DIR . 'alerts/warning-active-pro.php';
else:
?>
    <div class="iwbvel-variations-delete-type-container">
        <label for="iwbvel-variations-delete-type-selector"><?php esc_html_e('Delete type', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></label>
        <select id="iwbvel-variations-delete-type-selector">
            <option value="all"><?php esc_html_e('Delete all products variations', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></option>
            <option value="attributes"><?php esc_html_e('Delete the products variations according to the combination of the attributes', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></option>
        </select>
    </div>

    <div class="iwbvel-variations-delete-attribute-items">
        <div class="iwbvel-variations-delete-attribute-selector-container">
            <label for="iwbvel-variations-delete-attribute-selector"><?php esc_html_e('Select attribute', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></label>
            <select id="iwbvel-variations-delete-attribute-selector">
                <option value=""><?php esc_html_e('Select', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></option>
                <?php
                if (!empty($attributes) && is_array($attributes)) :
                    foreach ($attributes as $iwbvel_attribute) :
                ?>
                        <option value="pa_<?php echo esc_attr($iwbvel_attribute->attribute_name); ?>"><?php echo esc_html($iwbvel_attribute->attribute_label); ?></option>
                <?php
                    endforeach;
                endif;
                ?>
            </select>
        </div>
        <div class="iwbvel-variations-term-loading">
            <p><img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading-2.gif'); ?>" width="24"></p>
        </div>
        <div class="iwbvel-variations-delete-term-selector-container" style="display: none;">
            <label for="iwbvel-variations-delete-term-selector"><?php esc_html_e('Select term', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></label>
            <select id="iwbvel-variations-delete-term-selector"></select>
        </div>
    </div>

    <div class="iwbvel-variations-delete-container">
        <button type="button" class="iwbvel-button iwbvel-button-blue iwbvel-variations-delete-button"><i class="iwbvel-icon-check"></i> <?php esc_html_e('Submit', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></button>
    </div>
<?php endif; ?>