@extends('layouts.main')

@section('content')
    

    <!--main content  -->
    <section class="main-bg enter-teams d-flex align-items-center">
        <div class="container text-center mt-3">
            {{-- <img src="{{ asset('assets/images/img/Logo.svg') }}" alt="" class="img-logo start-0"> --}}
            <h1 class="text-white mb-4">Enter Team Names</h1>
            <form class="w-100" action="{{ route('create-link') }}" method="POST">
                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                <input type="hidden" name="type" id="teamType" value="Tournament">
                <div class="row justify-content-center">
                    <div class="col-md-4">
                        <div class="mb-3 blue-team mt-3 text-start">
                            <label for="blue" class="form-label text-blue ms-3">Blue Team</label>
                            <div class="input-box">
                                <input type="name" class="form-control rounded-0" id="name" placeholder="Enter Name" name="blue" autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="mb-3 red-team mt-3 text-start">
                            <label for="red" class="form-label text-red ms-3">Red Team</label>
                            <div class="input-box">
                                <input type="name" class="form-control rounded-0" id="red" placeholder="Enter Name" name="red" autocomplete="off">
                            </div>
                        </div>
                    </div>
                </div>
                <h1 class="text-white my-4">Select Game Mode</h1>
                <div class="row my-4 justify-content-center">
                    <div class="col-md-4 mb-3">
                        <div class="btn-style green-border select-btn w-100" onclick="teamType('Tournament')">
                            <p class="main-btn fw-bold w-100 m-0">Tournament</p>
                        </div>
                    </div>
                    <div class="col-md-4 mb-3">
                        <div class="btn-style select-btn1 white-border w-100" onclick="teamType('Fearless')">
                            <p class="main-btn fw-bold w-100 m-0 ">Fearless</p>
                        </div>
                    </div>
                </div>
                <div class="btn-style orange-border">
                    <Button class="main-btn fw-bold" type="submit">Create</Button>
                </div>
            </form>
        </div>
    </section>
@endsection

@push('script')
    <script>
        function teamType(type)
        {
            $('#teamType').val(type);
        }
    </script>
@endpush