<div>
    @component('common.breadcrumb', ['addBtn' => false, 'permission_create' => 'Company_employee_index','breadcrumb_show' => $breadcrumb_show])
        @slot('breadcrumb_title')
            <h3>{{ $componentName }} | {{ $pageTitle }}</h3>
        @endslot
        <li class="breadcrumb-item">Empresa</li>
        <li class="breadcrumb-item active">Empleado</li>

    @endcomponent
<div class="col-xl-12">
    <div class="card">
        <div class="card-header pb-0">
            <a href="{{ route('empleados') }}" class="btn btn-outline-primary btn-sm mb-5">
                <i class="fa fa-arrow-left"></i>
                Todos los empleados
            </a>
            <h5><b class="text-primary">Empleado</b> <span>{{ $first_name }} {{ $last_name }}</span></h5>
        </div>


        <div class="card-body">
            <ul class="nav nav-tabs border-tab" id="top-tab" role="tablist">
                <li class="nav-item">
                    <a class="nav-link active" id="resume-tab" data-bs-toggle="tab" href="#resume" role="tab" aria-controls="resume" aria-selected="true">
                        <i class="fas fa-address-card"></i>H.V.
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" id="job-position-tab" data-bs-toggle="tab" href="#job-position" role="tab" aria-controls="job-position" aria-selected="true">
                        <i class="fas fa-user-tie"></i>Cargo
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" id="psychotechnics-test-tab" data-bs-toggle="tab" href="#psychotechnics-test" role="tab" aria-controls="psychotechnics-test" aria-selected="true">
                        <i class="fas fa-question-circle"></i>Exámenes
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" id="work-permits-tab" data-bs-toggle="tab" href="#work-permits" role="tab" aria-controls="work-permits" aria-selected="true">
                        <i class="fas fa-calendar-day"></i>Permisos
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" id="work-certificates-tab" data-bs-toggle="tab" href="#work-certificates" role="tab" aria-controls="work-certificates" aria-selected="true">
                        <i class="fas fa-file-signature"></i>Certificados
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" id="documents-tab" data-bs-toggle="tab" href="#documents" role="tab" aria-controls="documents" aria-selected="true">
                        <i class="fas fa-tasks"></i>Documentos
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" id="payment_vouchers-tab" data-bs-toggle="tab" href="#payment_vouchers" role="tab" aria-controls="payment_vouchers" aria-selected="true">
                        <i class="fas fa-money-bill-wave"></i>Desprendibles
                    </a>
                </li>

            </ul>
            <div class="tab-content" id="top-tabContent">
                <div class="tab-pane fade show active" id="resume" role="tabpanel" aria-labelledby="resume">
                    <h5>Hoja de vida
                        <div class="row">
                            <div class="col-sm-12 col-md-12 mb-2">
                                <p>Tiempo para que el empleado pueda realizar actualizaciones en la hoja de vida:
                                {{ $employee_update_time }}
                                </p>
                            </div>
                            <div class="col-sm-12 col-md-12 mb-5">
                                @if ($max_days_update_cv == 1)
                                    <button wire:click="ResetUpdateTimeEmployee()" class="btn btn-outline-primary py-1 px-2">
                                        <i class="fa fa-refresh"></i> Restablecer tiempo a {{ $company_employee_update_time == 1 ? $company_employee_update_time . ' día' : $company_employee_update_time . ' días' }}
                                    </button>
                                @endif
                                @if ($close_update_cv == 1)
                                    <button wire:click="CloseTimeUpdateEmployee()" class="btn btn-outline-danger py-1 px-2">
                                        <i class="fa fa-times"></i> Cerrar tiempo para Actualizar hoja de vida
                                    </button>
                                @endif
                            </div>
                            @can('CvEmployee_pdf')
                                <div class="col-sm-12 col-md-6">
                                    <a href="{{ url('/hoja-de-vida/pdf/' . $user_id) }}" target="_blank"
                                        class="btn btn-outline-primary" title="Imprimir"> Ver PDF
                                        <i class="far fa-file-pdf"></i>
                                    </a>
                                </div>
                            @endcan
                    </h5>
                    @livewire('cv-employee-details-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
                <div class="tab-pane fade show" id="job-position" role="tabpanel" aria-labelledby="job-position">
                    <h5>Cargo</h5>
                    @livewire('company_-employee-profile-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
                <div class="tab-pane fade show" id="psychotechnics-test" role="tabpanel" aria-labelledby="psychotechnics-test">
                    <h5>Pruebas Psico-técnicas</h5>
                    @livewire('company_-employee-psychotechnics-test-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
                <div class="tab-pane fade show" id="work-permits" role="tabpanel" aria-labelledby="work-permits">
                    <h5>Permisos Laborales</h5>
                    @livewire('company_-employee-work-permits-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
                <div class="tab-pane fade show" id="work-certificates" role="tabpanel" aria-labelledby="work-certificates">
                    <h5>Certificados de trabajo</h5>
                    @livewire('company_-employee-work-certificates-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
                <div class="tab-pane fade show" id="documents" role="tabpanel" aria-labelledby="documents">
                    <h5>Documentos</h5>
                    @livewire('company_-employee-documents-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
                <div class="tab-pane fade show" id="payment_vouchers" role="tabpanel" aria-labelledby="payment_vouchers">
                    <h5>Desprendibles de Pago</h5>
                    @livewire('company_-employee-payment-vouchers-controller', ['id' => $user_id, 'breadcrumb_show' => false])
                </div>
            </div>
        </div>
    </div>
</div>
</div>
