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

<div class="iwbvel-modal" id="iwbvel-modal-it-wc-dynamic-pricing-all-fields">
    <div class="iwbvel-modal-container">
        <div class="iwbvel-modal-box iwbvel-modal-box-lg">
            <div class="iwbvel-modal-content">
                <div class="iwbvel-modal-title">
                    <h2><?php esc_html_e('All Fields', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?> - <span id="iwbvel-modal-it-wc-dynamic-pricing-all-fields-title" class="iwbvel-modal-item-title"></span></h2>
                    <button type="button" class="iwbvel-modal-close" data-toggle="modal-close">
                        <i class="iwbvel-icon-x"></i>
                    </button>
                </div>
                <div class="iwbvel-modal-body">
                    <div class="iwbvel-wrap">
                        <div class="iwbvel-col-half iwbvel-modal-section" data-type="simple,variation">
                            <div class="iwbvel-form-group">
                                <label>
                                    <input type="checkbox" id="iwbvel-it-wc-dynamic-pricing-disable-discount" value="yes">
                                    <?php esc_html_e('Disable Discount', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                                </label>
                            </div>
                            <div class="iwbvel-form-group">
                                <h3><?php esc_html_e('Set Price For Each Role', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></h3>
                                <div class="iwbvel-form-group" id="iwbvel-it-pricing-roles">
                                    <?php
                                    if (!empty($wp_roles) && !empty($wp_roles->roles)) :
                                        foreach ($wp_roles->roles as $iwbvel_role_key => $iwbvel_role) :
                                    ?>
                                            <div class="iwbvel-form-group">
                                                <label for="role_<?php echo esc_attr($iwbvel_role_key); ?>"><?php echo esc_html($iwbvel_role['name']); ?></label>
                                                <input type="number" id="role_<?php echo esc_attr($iwbvel_role_key); ?>" data-type="value" data-name="<?php echo esc_attr($iwbvel_role_key); ?>" placeholder="<?php esc_html_e('Amount ...', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>">
                                            </div>
                                    <?php
                                        endforeach;
                                    endif;
                                    ?>
                                </div>
                            </div>
                        </div>
                        <div class="iwbvel-col-half iwbvel-modal-section" data-type="simple,variable">
                            <div class="iwbvel-form-group">
                                <label>
                                    <input type="checkbox" id="iwbvel-it-wc-dynamic-pricing-hide-price-unregistered" value="yes">
                                    <?php esc_html_e('Hide Price (unregistered)', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                                </label>
                            </div>
                            <div class="iwbvel-form-group">
                                <label for="iwbvel-select-roles-hide-price"><?php esc_html_e('Hide Price', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></label>
                                <select id="iwbvel-select-roles-hide-price" class="iwbvel-select2" data-placeholder="<?php esc_html_e('Select ...', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>" multiple>
                                    <?php
                                    if (!empty($wp_roles) && !empty($wp_roles->roles)) :
                                        foreach ($wp_roles->roles as $iwbvel_role_key => $iwbvel_role) :
                                    ?>
                                            <option value="<?php echo esc_attr($iwbvel_role_key); ?>"><?php echo esc_html($iwbvel_role['name']); ?></option>
                                    <?php
                                        endforeach;
                                    endif;
                                    ?>
                                </select>
                            </div>
                            <div class="iwbvel-form-group">
                                <label for="iwbvel-select-roles-hide-add-to-cart"><?php esc_html_e('Hide Add to cart', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></label>
                                <select id="iwbvel-select-roles-hide-add-to-cart" class="iwbvel-select2" data-placeholder="<?php esc_html_e('Select ...', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>" multiple>
                                    <?php
                                    if (!empty($wp_roles) && !empty($wp_roles->roles)) :
                                        foreach ($wp_roles->roles as $iwbvel_role_key => $iwbvel_role) :
                                    ?>
                                            <option value="<?php echo esc_attr($iwbvel_role_key); ?>"><?php echo esc_html($iwbvel_role['name']); ?></option>
                                    <?php
                                        endforeach;
                                    endif;
                                    ?>
                                </select>
                            </div>
                            <div class="iwbvel-form-group">
                                <label for="iwbvel-select-roles-hide-product"><?php esc_html_e('Hide Product', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></label>
                                <select id="iwbvel-select-roles-hide-product" class="iwbvel-select2" data-placeholder="<?php esc_html_e('Select ...', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>" multiple>
                                    <?php
                                    if (!empty($wp_roles) && !empty($wp_roles->roles)) :
                                        foreach ($wp_roles->roles as $iwbvel_role_key => $iwbvel_role) :
                                    ?>
                                            <option value="<?php echo esc_attr($iwbvel_role_key); ?>"><?php echo esc_html($iwbvel_role['name']); ?></option>
                                    <?php
                                        endforeach;
                                    endif;
                                    ?>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="iwbvel-modal-footer">
                    <button type="button" id="iwbvel-modal-it-wc-dynamic-pricing-all-fields-apply" data-item-id="" data-content-type="gallery" class="iwbvel-button iwbvel-button-blue" data-toggle="modal-close">
                        <?php esc_html_e('Apply Changes', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>