<?php
/**
 * انبارداری — ورود داده و خروج داده محصول (CSV) با موتور ووکامرس و ظاهر زرتی.
 */
if (!defined('ABSPATH')) {
    exit;
}

$wc_ok = function_exists('zerti_product_import_export_available') && zerti_product_import_export_available();
$zerti_ui_dir = function_exists('zerti_get_text_direction') ? zerti_get_text_direction() : 'rtl';
?>
<div class="zerti-component zerti-component-inventory zerti-component-inventory-import-export zerti-inventory-sub-slot"
     data-zerti-inv-active="import-export"
     data-zerti-inv-component="import-export">
    <?php if (!$wc_ok) : ?>
        <p class="alert alert-warning mb-0" role="status">
            <?php esc_html_e('WooCommerce must be installed and active for product import and export.', 'zerti'); ?>
        </p>
    <?php else : ?>
        <div class="zerti-inv-ie" data-zerti-inv-import-export="1">
            <div class="zerti-inv-ie__scroll" dir="<?php echo esc_attr($zerti_ui_dir); ?>" tabindex="-1">
                <?php zerti_render_inventory_import_export_content(); ?>
            </div>
        </div>
    <?php endif; ?>
</div>
