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

if (!empty($column_manager_presets)) :
?>
    <?php $iwbvel_i = 1 ?>
    <?php foreach ($column_manager_presets as $iwbvel_key => $iwbvel_column_manager_preset) : ?>
        <tr>
            <td><?php echo esc_html($iwbvel_i); ?></td>
            <td>
                <span class="iwbvel-history-name"><?php echo (isset($iwbvel_column_manager_preset['name'])) ? esc_html($iwbvel_column_manager_preset['name']) : ''; ?></span>
            </td>
            <td><?php echo (isset($iwbvel_column_manager_preset['date_modified'])) ? esc_html(gmdate('d M Y', strtotime($iwbvel_column_manager_preset['date_modified']))) : ''; ?></td>
            <td>
                <?php if (!in_array($iwbvel_key, \iwbvel\classes\repositories\Column::get_default_columns_name())) : ?>
                    <button type="button" class="iwbvel-button iwbvel-button-blue iwbvel-column-manager-edit-field-btn" data-toggle="modal" data-target="#iwbvel-modal-column-manager-edit-preset" value="<?php echo esc_attr($iwbvel_key); ?>" data-preset-name="<?php echo (isset($iwbvel_column_manager_preset['name'])) ? esc_attr($iwbvel_column_manager_preset['name']) : ''; ?>">
                        <i class="iwbvel-icon-pencil"></i>
                        <?php esc_html_e('Edit', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                    </button>
                    <button type="button" name="delete_preset" class="iwbvel-button iwbvel-button-red iwbvel-column-manager-delete-preset" value="<?php echo esc_attr($iwbvel_key); ?>">
                        <i class="iwbvel-icon-trash-2"></i>
                        <?php esc_html_e('Delete', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                    </button>
                <?php else : ?>
                    <i class="iwbvel-icon-lock1"></i>
                <?php endif; ?>
            </td>
        </tr>
        <?php $iwbvel_i++; ?>
    <?php endforeach; ?>
<?php endif; ?>