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

$iwbvel_woo_multi_currency_params = get_option('woo_multi_currency_params', []);
if (!empty($iwbvel_woo_multi_currency_params) && isset($iwbvel_woo_multi_currency_params['enable_fixed_price']) && intval($iwbvel_woo_multi_currency_params['enable_fixed_price']) === 1) :
    // delete default currency
    if (!empty($iwbvel_woo_multi_currency_params['currency'][0])) {
        unset($iwbvel_woo_multi_currency_params['currency'][0]);
    }

    // get active currencies
    if (!empty($iwbvel_woo_multi_currency_params['currency'])) :
        if (!empty($iwbvel_woo_multi_currency_params['currency']) && is_array($iwbvel_woo_multi_currency_params['currency'])) :
?>
            <strong>By Villa Theme</strong>
            <hr>

            <?php foreach ($iwbvel_woo_multi_currency_params['currency'] as $iwbvel_currency) : ?>
                <div class="iwbvel-form-group" data-name="_regular_price_wmcp" data-sub-name="<?php echo esc_attr($iwbvel_currency); ?>" data-type="meta_field">
                    <label for="iwbvel-bulk-edit-form-woo-multi-currency-regular-price-<?php echo esc_attr($iwbvel_currency); ?>"><?php echo esc_html('Regular price (' . $iwbvel_currency . ')'); ?></label>
                    <select data-field="operator" id="iwbvel-bulk-edit-form-woo-multi-currency-regular-price-operator-<?php echo esc_attr($iwbvel_currency); ?>">
                        <?php include IWBVEL_VIEWS_DIR . "bulk_edit/bulk_edit_form/operators/number.php"; ?>
                    </select>
                    <input type="number" data-field="value" id="iwbvel-bulk-edit-form-woo-multi-currency-regular-price-<?php echo esc_attr($iwbvel_currency); ?>" placeholder="Regular price (<?php echo esc_attr($iwbvel_currency); ?>)">
                </div>
                <div class="iwbvel-form-group" data-name="_sale_price_wmcp" data-sub-name="<?php echo esc_attr($iwbvel_currency); ?>" data-type="meta_field">
                    <label for="iwbvel-bulk-edit-form-woo-multi-currency-sale-price-<?php echo esc_attr($iwbvel_currency); ?>"><?php echo esc_html('Sale price (' . $iwbvel_currency . ')'); ?></label>
                    <select data-field="operator" id="iwbvel-bulk-edit-form-woo-multi-currency-sale-price-operator-<?php echo esc_attr($iwbvel_currency); ?>">
                        <?php include IWBVEL_VIEWS_DIR . "bulk_edit/bulk_edit_form/operators/number.php"; ?>
                    </select>
                    <input type="number" data-field="value" id="iwbvel-bulk-edit-form-woo-multi-currency-sale-price-<?php echo esc_attr($iwbvel_currency); ?>" placeholder="Sale price (<?php echo esc_attr($iwbvel_currency); ?>)">
                </div>
<?php
            endforeach;
        endif;
    endif;
endif;
