<?php
/**
 * مشتریان — component partial: WooCommerce customers (AG Grid).
 */
if (!defined('ABSPATH')) {
    exit;
}

$wc_ok = class_exists('WooCommerce');
?>
<?php zerti_ui_component_open('customers'); ?>
    <?php if (!$wc_ok) : ?>
        <?php zerti_ui_wc_required_notice(__('WooCommerce must be installed and active to view customers.', 'zerti')); ?>
    <?php else : ?>
        <div class="zerti-customers-panel">
            <div class="zerti-customers-wrap">
                <?php
                zerti_ui_toolbar_open(
                    __('Search and export customers list', 'zerti'),
                    'zerti-customers-grid-toolbar'
                );
                ?>
                    <div class="zerti-customers-grid-toolbar-search"></div>
                    <?php do_action('zerti_customers_toolbar_export'); ?>
                <?php zerti_ui_toolbar_close(); ?>
                <?php
                zerti_ui_ag_grid_region(
                    'zertiCustomersGrid',
                    'zerti-customers-grid',
                    __('Customers table', 'zerti')
                );
                ?>
            </div>
        </div>
    <?php endif; ?>
<?php zerti_ui_component_close(); ?>
