@extends('layout.app')

@section('content')
    <form action="{{ route('tokenCode.store') }}" method="POST">
        @csrf
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="form-group col-md-4">
                        <label for="shortname">
                            Token Category*
                        </label>
                        <select class="form-control bSelect" name="tokenCategory">
                            <option value="">Select Token Category</option>
                            @forelse ($tokenCategory as $item)
                                <option value="{{ $item->id }}">{{ $item->tokenCategory }}</option>
                            @empty
                            @endforelse
                        </select>
                    </div>

                    <div class="form-group col-md-4">
                        <label for="shortname">
                            Token Code*
                        </label>
                        <input type="text" name="tokenCode" id="name" value="" class="form-control "
                            placeholder="Token Code" autocomplete="off">
                        @error('tokenCode')
                            <div class="alert alert-danger mt-1">
                                {{ $message }}
                            </div>
                        @enderror
                    </div>
                    <div class="form-group col-md-4">
                        <label for="shortname">
                           Solve Time in minutes
                        </label>
                        <input type="text" name="solve_time" id="name" value="" class="form-control "
                            placeholder="Solve Time in minutes" autocomplete="off">
                        @error('solve_time')
                            <div class="alert alert-danger mt-1">
                                {{ $message }}
                            </div>
                        @enderror
                    </div>

                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary float-right">
                        Save
                    </button>
                </div>
            </div>
        </div>
    </form>
@endsection
