@php($title = 'Зарегистрированные по приглашению агенты')
@extends('layouts.app')
@section('content')
    <h4>{{ $invite->company->name }}</h4>
    <div class="d-none mb-3 sticky-top bg-light rounded-3">
        <div class="p-2 w-100"></div>
        <div class="p-2 flex-shrink-1">
            <form class="d-none" method="post" action="{{ route('company.invites.create', ['company' => 1]) }}">
                @csrf
                <input class="btn btn-primary" type="submit" value="Создать приглашение" />
            </form>
        </div>
    </div>

    <h5>Зарегистрированные по приглашению агенты</h5>
    <div class="row g-2 w-100">
        @foreach ($invite->registrations()->orderBy('created_at', 'desc')->get() as $inviteRegistration)
            <div class="d-flex flex-row w-100 gap-3 bg-light rounded-3 p-2">
                <div class="col flex-fill">
                    {{ $inviteRegistration->agent->user?->name }}
                </div>
                <div class="col-2">
                    {{ $inviteRegistration->created_at->diffForHumans() }}
                </div>
                <div class="col-1 d-none">
                    <div class="dropdown d-none d-md-block" style="">
                        <button class="btn btn-light" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <i class="bi bi-three-dots-vertical"></i>
                        </button>
                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" data-popper-placement="bottom-start">
                            
                        </div>
                    </div>
                </div>
            </div>
        @endforeach
    </div>
    </div>
@endsection