@php($title = 'Приглашения агентов')
@extends('layouts.guest')
@section('content')
<form class="modal-content" action="{{ route('company.invite.process', ['hash' => $invite->hash]) }}" method="post">
    <h1 class="mb-3 fs-5" id="exampleModalLabel">Форма регистрации агента</h1>
        
    <div class="modal-body">
        @csrf
        в агентство<br><div class="badge bg-primary">{{ $invite->company->name }}</div>
        <input type="hidden" class="form-control" id="company_id" name="company_id" value="{{ $invite->company->id }}">

        <div class="mb-3 mt-3">
            <label for="agentName" class="form-label">Полное имя (ФИО)</label>
            <input type="text" class="form-control" id="agentName" name="name" value="{{ old('name') }}">
        </div>

        <div class="mb-3">
            <label for="agentEmail" class="form-label">Электронная почта</label>
            <input type="text" class="form-control" id="agentEmail" name="email" value="{{ old('email') }}">
        </div>

        <div class="mb-3">
            <label for="agentPhone" class="form-label">Телефон</label>
            <input type="tel" class="form-control" id="agentPhone" name="phone" value="{{ old('phone') }}">
        </div>
    </div>
    <div class="modal-footer gap-3">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Отмена</button>
        <input type="submit" class="btn btn-primary" value="Зарегистрироваться">
    </div>
</form>
@endsection