<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="openAddRF()"
                        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 ($references as $reference)
                        <li class="list-group-item">
                            <div class="row">
                                <div class="col-sm-12 col-md-3">
                                    <h5>{{ $reference->company }}</h5>
                                    <p>{{ $reference->title_position }}</p>
                                </div>
                                <div class="col-sm-12 col-md-3 d-flex align-items-end justify-content-start">
                                    @if ($reference->name != null)
                                        <a>{{ $reference->name }}</a>
                                    @endif
                                </div>
                                <div class="col-sm-12 col-md-3 d-flex align-items-end justify-content-start">
                                    @if ($reference->phone != null)
                                        <a>{{ $reference->phone }}</a>
                                    @endif
                                </div>
                                <div class="col-sm-12 col-md-2 d-flex align-items-center justify-content-end">
                                    @if ($this->activeButtonSaveUpdate)
                                        <span wire:click="EditRF({{ $reference->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('{{ $reference->id }}','RF')"
                                            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.references.form')
    @include('common.scriptsCompCV', ['ComponentId' => 'RF'])
</div>
