@extends('layouts.app')
@section('content')
<div class="bg-light">
    <div class="container pt-3">
        <nav class="mb-0">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="{{route('index')}}"><u>Home</u></a></li>
                <li class="breadcrumb-item active" aria-current="page">Contact us</li>
            </ol>
        </nav>
    </div>
</div>
<div class="container py-5">
    <div class="row justify-content-center">
      <div class="col-lg-8 bg-grey p-lg-5 p-4" style="border-bottom:7px solid var(--pry-color);">
        <h5 class="subtitle">Get In Touch</h5>
        <p>If you have questions about the Snyder HemBand, our training program, or anything else, please contact us anytime. We’ll get back to you as soon as possible, typically within 1 business day.</p>
        <form class="" action="{{ route('submit-contact') }}" method="post" autocomplete="off">
          @csrf
          <div class="row">
            <div class="col-12">
                @if($errors->any())
              <div class="alert alert-danger fade show" role="alert">
                  There were errors found!
              </div>
              @endif
              @if(session('success'))
              <div class="alert alert-success fade show" role="alert">
                  {{session('success')}}
              </div>
              @endif
            </div>
            <div class="col-lg-6 form-group mb-4">
              <input type="text" class="form-control rounded-0 py-3" name="name_first" placeholder="First Name" value="{{ old('name_first') }}">
              @error('name_first')
                <small class="text-warning">{{$message}}</small>
              @enderror
            </div>
            <div class="col-lg-6 form-group mb-4">
              <input type="text" class="form-control rounded-0 py-3" name="name_last" placeholder="Last Name" value="{{ old('name_last') }}">
              @error('name_last')
                <small class="text-warning">{{$message}}</small>
              @enderror
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6 form-group mb-4">
              <input type="email" class="form-control rounded-0 py-3" name="email" placeholder="Email Address" value="{{ old('email') }}">
              @error('email')
                  <small class="text-warning">{{$message}}</small>
                @enderror
            </div>
            <div class="col-lg-6 form-group mb-4">
              <input type="text" class="form-control rounded-0 py-3 phone" name="phone" placeholder="Phone Number" value="{{ old('phone') }}">
              @error('phone')
                  <small class="text-warning">{{$message}}</small>
                @enderror
            </div>
          </div>

          <div class="form-group mb-4">
            <input type="text" class="form-control rounded-0 py-3 zip" name="zip" placeholder="Zip Code" value="{{ old('zip') }}">
            @error('zip')
                <small class="text-warning">{{$message}}</small>
              @enderror
          </div>
          <div class="form-group mb-4">
            <input type="text" class="form-control rounded-0 py-3" name="subject" placeholder="Subject" value="{{ old('subject') }}">
            @error('subject')
                <small class="text-warning">{{$message}}</small>
              @enderror
          </div>
          <div class="form-group mb-4">
            <textarea name="message" class="form-control rounded-0" placeholder="Message" rows="6">{{ old('message') }}</textarea>
            @error('message')
                <small class="text-warning">{{$message}}</small>
              @enderror
          </div>
          <div class="form-group mb-4">
              {!! htmlFormSnippet() !!}
              @error('g-recaptcha-response')
                <small class="text-danger"><i class="fas fa-exclamation-triangle mr-2"></i>Invalid</small>
              @enderror
            </div>
          <button type="submit" class="btn btn-pry w-100 py-3">SUBMIT</button>
        </form>
      </div>
    </div>
  </div>
@endsection
