@extends('tablar::page')

@section('content')
<div class="page-header d-print-none">
    <div class="container-xl">
        <div class="row g-2 align-items-center">
            <div class="col">
                <h2 class="page-title">Peoples Choice Entry</h2>
            </div>
        </div>
    </div>
</div>
<div class="page-body">
    <div class="container-xl">
        <div class="row row-cards">
            <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <form method="POST" action="/pcentry" class="row g-3">
                            {{ csrf_field() }}
                            <div class="col-md-6">
                                <label for="vehicle_id" class="form-label">Vehicle</label>
                                <select name="vehnum" id="vehicle_id" class="form-select" required>
                                    <option value="">Select Vehicle</option>
                                    @foreach($vehicles as $vehicle)
                                        <option value="{{ $vehicle->id }}">#{{ $vehicle->owner }} - {{ $vehicle->year }} {{ $vehicle->make }} {{ $vehicle->model }}</option>
                                    @endforeach
                                </select>
                            </div>
                            <div class="col-md-6">
                                <label for="pc_count" class="form-label">Total Votes</label>
                                <input type="number" name="pc_count" id="pc_count" class="form-control" required>
                            </div>
                            <div class="col-12">
                                <button type="submit" class="btn btn-primary">Submit Choice</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@include('components.tomselect')
@push('js')
@endpush
