@props([
    'thead' => [],
    'pagination' => null,
    'responsive' => true,
    'tableClass' => '',
    'theadWidths' => [],
])

<div class="row">
    <div class="col-12">
        <div @class(['table-responsive' => $responsive])>
            <table @class([
                'table table-bordered table-hover table-striped align-middle text-center',
                $tableClass,
            ])>
                {{-- Cabeçalho --}}
                @include('components.tables._thead', [
                    'thead' => $thead,
                    'theadWidths' => $theadWidths,
                ])

                <tbody>
                    @if(isset($body) && trim($body) !== '')
                        {!! $body !!}
                    @else
                        <tr>
                            <td colspan="{{ count($thead) }}">* Nenhum registro encontrado</td>
                        </tr>
                    @endif
                </tbody>
            </table>
        </div>
    </div>

    @if(!empty($pagination))
        <div class="col-12 my-3">
            <div class="d-flex justify-content-center">
                {!! $pagination !!}
            </div>
        </div>
    @endif
</div>
