<!doctype html>
<html lang="{{ app()->getLocale() }}" dir="{{ in_array(app()->getLocale(), ['ar']) ? 'rtl' : 'ltr' }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ __('vrc::lang.book_appointment') }}</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
</head>
<body class="bg-light">
<div class="container" style="max-width:560px; margin-top:30px;">
    <div class="card shadow-sm">
        <div class="card-header bg-primary text-white"><h4 class="mb-0"><i class="fa fa-car"></i> {{ __('vrc::lang.book_appointment') }}</h4></div>
        <div class="card-body">
            @if(session('vrc_msg'))<div class="alert alert-success">{{ session('vrc_msg') }}</div>@endif
            @if($errors->any())<div class="alert alert-danger"><ul class="mb-0">@foreach($errors->all() as $e)<li>{{ $e }}</li>@endforeach</ul></div>@endif

            <form method="POST" action="{{ route('vrc.portal.book.store') }}">
                @csrf
                <div class="form-group"><label>{{ __('vrc::lang.name') }} *</label><input name="name" class="form-control" value="{{ old('name') }}" required></div>
                <div class="form-group"><label>{{ __('vrc::lang.phone') }} *</label><input name="phone" class="form-control" value="{{ old('phone') }}" required></div>
                <div class="row">
                    <div class="col-6 form-group"><label>{{ __('vrc::lang.make') }}</label>
                        <select name="make_id" class="form-control"><option value="">—</option>@foreach($makes as $id => $name)<option value="{{ $id }}" {{ old('make_id')==$id?'selected':'' }}>{{ $name }}</option>@endforeach</select>
                    </div>
                    <div class="col-6 form-group"><label>{{ __('vrc::lang.model') }}</label><input name="model" class="form-control" value="{{ old('model') }}"></div>
                </div>
                <div class="form-group"><label>{{ __('vrc::lang.plate_number') }}</label><input name="plate_number" class="form-control" value="{{ old('plate_number') }}"></div>
                <div class="form-group"><label>{{ __('vrc::lang.scheduled_start') }} *</label><input type="datetime-local" name="scheduled_start" class="form-control" value="{{ old('scheduled_start') }}" required></div>
                <div class="form-group"><label>{{ __('vrc::lang.concern') }}</label><textarea name="concern" class="form-control" rows="3">{{ old('concern') }}</textarea></div>
                <button class="btn btn-primary btn-lg btn-block">{{ __('vrc::lang.request_booking') }}</button>
            </form>
        </div>
    </div>
    <p class="text-center text-muted mt-3" style="font-size:12px;">{{ config('app.name') }}</p>
</div>
</body>
</html>
