<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'module',
    'filters' => [],
    'import' => null,
    'formats' => ['xlsx', 'csv', 'pdf'],
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'module',
    'filters' => [],
    'import' => null,
    'formats' => ['xlsx', 'csv', 'pdf'],
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<?php
    $registry = app(\App\Services\ImportExport\ModuleRegistry::class);
    $supportsImport = $import ?? ($registry->exists($module) && $registry->get($module)->supportsImport());
    $query = http_build_query(array_filter($filters));
    $suffix = $query ? '?'.$query : '';
?>

<div class="btn-group" style="display:inline-flex; gap:6px; flex-wrap:wrap;">
    <?php $__currentLoopData = $formats; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $format): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
            $label = match($format) {
                'xlsx' => 'Excel',
                'csv' => 'CSV',
                'pdf' => 'PDF',
                default => strtoupper($format),
            };
        ?>
        <a href="<?php echo e(route('data.export', ['module' => $module, 'format' => $format]).$suffix); ?>"
           class="btn btn-outline btn-sm"><?php echo e($label); ?></a>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    <?php if($supportsImport): ?>
        <a href="<?php echo e(route('data.import.index', $module)); ?>" class="btn btn-outline btn-sm">Import</a>
        <a href="<?php echo e(route('data.import.template', $module)); ?>" class="btn btn-ghost btn-sm">Template</a>
    <?php endif; ?>
</div>
<?php /**PATH C:\laragon\www\southend\resources\views/components/export-menu.blade.php ENDPATH**/ ?>