<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="openAddAF()" 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 ($academic_formations as $academic_formation)
                        <li class="list-group-item">
                            <div class="row">
                                <div class="col-sm-12 col-md-5">
                                    <h5>{{ $academic_formation->institution_name }}</h5>
                                    <p>{{ $academic_formation->educational_level_name }}</p>
                                </div>
                                <div class="col-sm-12 col-md-5 d-flex align-items-end justify-content-start">
                                    @if ($academic_formation->study_area != null)
                                        <p>{{ $academic_formation->study_area }}</p>
                                    @endif
                                </div>
                                <div class="col-sm-12 col-md-2 d-flex align-items-center justify-content-end">
                                    @if ($this->activeButtonSaveUpdate)
                                        <span  wire:click="EditAF({{ $academic_formation->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('{{ $academic_formation->id }}','AF')" 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.academic-formation.form')
    @include('common.scriptsCompCV', ['ComponentId' => 'AF'])
</div>

