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

$iwbvel_upload_type = isset($iwbvel_item['upload_type']) ? $iwbvel_item['upload_type'] : 'single';
$iwbvel_target = $iwbvel_upload_type === 'single' ? 'bulk-edit-image' : 'bulk-edit-gallery';
?>
<button <?php echo (isset($iwbvel_item['disabled']) && $iwbvel_item['disabled']) ? 'disabled="disabled"' : ''; ?>
    type="button"
    data-type="<?php echo esc_attr($iwbvel_upload_type); ?>"
    class="iwbvel-button iwbvel-button-blue iwbvel-float-left iwbvel-open-uploader"
    data-target="<?php echo esc_attr($iwbvel_target); ?>">
    <?php echo ($iwbvel_upload_type === 'single') ? esc_html__('Choose image', 'ithemeland-bulk-variation-editing-for-woocommerce') : esc_html__('Choose images', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
</button>

<?php if ($iwbvel_upload_type === 'single'): ?>
    <input type="hidden" data-field="value" class="iwbvel-bulk-edit-form-item-image">
    <div class="iwbvel-bulk-edit-form-item-image-preview"></div>
<?php else: ?>
    <div class="iwbvel-bulk-edit-form-item-gallery"></div>
    <div class="iwbvel-bulk-edit-form-item-gallery-preview"></div>
    <span class="iwbvel-bulk-edit-form-item-remove-all-images" style="display:none;">
        <?php esc_html_e('Remove all images', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
    </span>
<?php endif; ?>