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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'thead' => [],
    'pagination' => null,
    'responsive' => true,
    'tableClass' => '',
    'theadWidths' => [],
]));

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(([
    'thead' => [],
    'pagination' => null,
    'responsive' => true,
    'tableClass' => '',
    'theadWidths' => [],
]), '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); ?>

<div class="row">
    <div class="col-12">
        <div class="<?php echo \Illuminate\Support\Arr::toCssClasses(['table-responsive' => $responsive]); ?>">
            <table class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                'table table-bordered table-hover table-striped align-middle text-center',
                $tableClass,
            ]); ?>">
                
                <?php echo $__env->make('components.tables._thead', [
                    'thead' => $thead,
                    'theadWidths' => $theadWidths,
                ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

                <tbody>
                    <?php if(isset($body) && trim($body) !== ''): ?>
                        <?php echo $body; ?>

                    <?php else: ?>
                        <tr>
                            <td colspan="<?php echo e(count($thead)); ?>">* Nenhum registro encontrado</td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>

    <?php if(!empty($pagination)): ?>
        <div class="col-12 my-3">
            <div class="d-flex justify-content-center">
                <?php echo $pagination; ?>

            </div>
        </div>
    <?php endif; ?>
</div>
<?php /**PATH /var/www/html/portal/resources/views/components/tables/_table.blade.php ENDPATH**/ ?>