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

<div class="iwbvel-float-side-modal" id="iwbvel-float-side-modal-column-manager">
    <div class="iwbvel-float-side-modal-container">
        <div class="iwbvel-float-side-modal-box">
            <div class="iwbvel-float-side-modal-content">
                <div class="iwbvel-float-side-modal-title">
                    <h2><?php esc_html_e('Column Manager', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></h2>
                    <button type="button" class="iwbvel-float-side-modal-close" data-toggle="float-side-modal-close">
                        <i class="iwbvel-icon-x"></i>
                    </button>
                </div>
                <div class="iwbvel-float-side-modal-body">
                    <div class="iwbvel-wrap">
                        <div class="iwbvel-alert iwbvel-alert-default">
                            <span><?php esc_html_e('Mange columns of table. You can Create your customize presets and use them in column profile section.', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></span>
                        </div>
                        <div class="iwbvel-column-manager-items">
                            <h3><?php esc_html_e('Column Profiles', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></h3>
                            <form action="<?php echo esc_url(admin_url('admin-post.php')); ?>" method="post" id="iwbvel-column-manager-delete-preset-form">
                                <?php wp_nonce_field('iwbvel_post_nonce'); ?>
                                <input type="hidden" name="action" value="iwbvel_column_manager_delete_preset">
                                <input type="hidden" name="delete_key" id="iwbvel_column_manager_delete_preset_key">
                                <div class="iwbvel-table-border-radius">
                                    <table>
                                        <thead>
                                            <tr>
                                                <th>#</th>
                                                <th><?php esc_html_e('Profile Name', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
                                                <th><?php esc_html_e('Date Modified', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
                                                <th><?php esc_html_e('Actions', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td style="text-align: center;" colspan="4"><img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading-2.gif'); ?>" alt="Loading ..." width="20" height="20"></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </form>
                        </div>
                        <div class="iwbvel-column-manager-new-profile">
                            <h3 class="iwbvel-column-manager-section-title"><?php esc_html_e('Create New Profile', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></h3>
                            <div class="iwbvel-column-manager-new-profile-left">
                                <input type="text" title="<?php esc_html_e('Search Field', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>" data-action="new" placeholder="<?php esc_attr_e('Search Field ...', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>" class="iwbvel-column-manager-search-field">
                                <div class="iwbvel-column-manager-available-fields" data-action="new">
                                    <label class="iwbvel-column-manager-check-all-fields-btn" data-action="new">
                                        <input type="checkbox" class="iwbvel-column-manager-check-all-fields">
                                        <span><?php esc_html_e('Select All', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></span>
                                    </label>
                                    <ul>
                                        <li style="text-align: center;"><img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading-2.gif'); ?>" alt="Loading ..." width="20" height="20"></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="iwbvel-column-manager-new-profile-middle">
                                <div class="iwbvel-column-manager-middle-buttons">
                                    <div>
                                        <button type="button" data-action="new" data-type="checked" class="iwbvel-button iwbvel-button-lg iwbvel-button-square-lg iwbvel-button-blue iwbvel-column-manager-add-field">
                                            <i class="iwbvel-icon-chevron-right"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                            <form action="<?php echo esc_url(admin_url('admin-post.php')); ?>" method="post" id="iwbvel-column-manager-add-new-preset">
                                <?php wp_nonce_field('iwbvel_post_nonce'); ?>
                                <input type="hidden" name="action" value="iwbvel_column_manager_new_preset">
                                <div class="iwbvel-column-manager-new-profile-right">
                                    <div class="iwbvel-column-manager-right-top">
                                        <input type="text" title="Profile Name" id="iwbvel-column-manager-new-preset-name" name="preset_name" placeholder="Profile name ..." required>
                                        <button type="submit" name="save_preset" id="iwbvel-column-manager-new-preset-btn" class="iwbvel-button iwbvel-button-lg iwbvel-button-blue">
                                            <img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'save.svg'); ?>" alt="">
                                            <?php esc_html_e('Save Preset', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                                        </button>
                                    </div>
                                    <div class="iwbvel-column-manager-added-fields-wrapper">
                                        <p class="iwbvel-column-manager-empty-text"><?php esc_html_e('Please add your columns here', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?></p>
                                        <div class="iwbvel-column-manager-added-fields" data-action="new">
                                            <div class="items"></div>
                                            <img src="<?php echo esc_url(IWBVEL_IMAGES_URL . 'loading.gif'); ?>" alt="" class="iwbvel-box-loading iwbvel-hide">
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>