<div>
    <h3>{{ $componentName }} </h3>

    <div class="container-fluid">
        <div class="row layout-top-spacing">
            <div class="col-sm-12">
                @if ($this->activeButtonSaveUpdate)
                    <a href="javascript:void(0)" wire:click.prevent="openAddWE()"
                        class="btn btn-square btn-primary txt-white mb-4 mt-4">Agregar <i class="fa fa-plus"></i>
                    </a>
                @endif
                <ul class="list-group list-group-flush">
                    @foreach ($work_experiences as $work_experience)
                        <li class="list-group-item">
                            <div class="row">
                                <div class="col-sm-12 col-md-3">
                                    <h5>{{ $work_experience->company }}</h5>
                                </div>
                                <div class="col-sm-12 col-md-5 d-flex align-items-end justify-content-start">
                                    @if ($work_experience->title_position != null)
                                        <a>{{ $work_experience->title_position }}</a>
                                    @endif
                                </div>
                                <div class="col-sm-12 col-md-2 d-flex align-items-end justify-content-start">
                                    @if ($work_experience->title_position != null)
                                        <span>{{ $work_experience->date_entry }} -
                                            {{ $work_experience->date_retirement }}</span>
                                    @endif
                                </div>
                                <div class="col-sm-12 col-md-2 d-flex align-items-center justify-content-end">
                                    @if ($this->activeButtonSaveUpdate)
                                        <span wire:click="EditWE({{ $work_experience->id }})"
                                            class="c-pointer action-box large complete-btn f-right" title="Editar">
                                            <i class="fas fa-edit f-20 text-primary"></i>
                                        </span>
                                        <span onclick="ConfirmCV('{{ $work_experience->id }}','WE')"
                                            class="c-pointer action-box large complete-btn f-right" title="Eliminar">
                                            <i class="fas fa-trash f-20 text-danger"></i>
                                        </span>
                                    @endif
                                </div>
                            </div>
                        </li>
                    @endforeach
                </ul>

            </div>
        </div>
    </div>
    @include('livewire.cv-employee.detail.partials.work-experiences.form')
    @include('common.scriptsCompCV', ['ComponentId' => 'WE'])
</div>
