<div>
    @component('common.breadcrumb', ['addBtn' => true, 'permission_create' => 'Type_work_permit_create', 'breadcrumb_show' => $breadcrumb_show])
        @slot('breadcrumb_title')
            <h3>{{ $componentName }} | {{ $pageTitle }}</h3>
        @endslot
        <li class="breadcrumb-item">Administración</li>
        <li class="breadcrumb-item active">Tipos de Permisos Laborales</li>
    @endcomponent
    @include('common.searchbox')
    <div class="container-fluid">
        <div class="row layout-top-spacing">
            <div class="col-sm-12">
                <div class="card">
                    <div class="table-responsive">
                        <table class="table">
                            <thead class="bg-primary">
                                <tr>
                                    <th scope="col">ID</th>
                                    <th scope="col">NOMBRE @include('common.orderby', ['column' => 'name'])</th>
                                    <th scope="col">REQUIERE SOPORTE</th>
                                    <th scope="col" class="text-center">ACCIONES</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($types_wp as $type_wp)
                                    <tr>
                                        <td>{{ $type_wp->id }}</td>
                                        <td>{{ $type_wp->name }}</td>
                                        <td>
                                            <p class="text-center">
                                                @if($type_wp->support_document_required)
                                                    <i class="fas fa-check text-success"></i>
                                                @else
                                                    <i class="fas fa-times text-danger"></i>
                                                @endif
                                            </p>
                                        </td>
                                        <td class="text-center">
                                            @can('Type_work_permit_update')
                                            <a href="javascript:void(0)" wire:click="Edit({{ $type_wp->id }})"
                                                class="btn btn-outline-primary" title="Editar">
                                                <i class="fas fa-edit"></i>
                                            </a>
                                            @endcan
                                            @can('Type_work_permit_delete')
                                            <a href="javascript:void(0)" onclick="Confirm('{{ $type_wp->id }}')"
                                                class="btn btn-outline-danger " title="Eliminar">
                                                <i class="fas fa-trash"></i>
                                            </a>
                                            @endcan
                                        </td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                        {{ $types_wp->links() }}
                    </div>
                </div>
            </div>
        </div>
        @include('livewire.type_work_permit.form')
    </div>
</div>
@include('common.scriptsCompStandar')
