@extends('layouts.hcp')
@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"><a href="{{route('hcp.index')}}"><u>Healthcare Professionals</u></a></li>
        <li class="breadcrumb-item active" aria-current="page">Get Trained</li>
      </ol>
    </nav>
  </div>
</div>
<div class="container py-5 my-4">
  <div class="row">
    <div class="col-lg-5">
      <h5 class="subtitle">Schedule Training</h5>
      <p>We’re excited that your practice is interested in offering the Snyder HemBand system to your patients. To provide the best in patient care, we have a number of training modules for healthcare professionals, clinical staff, and office staff available to support our practice partners. Our in-person and online module options have been created with the help of leading gastroenterologists.</p>

      <!-- <div class="row mt-5">
        <div class="col-sm-6 mb-4">
          <h5 class="header m-0">Our Office</h5>
          <hr class="w-100 my-3">
          <div class="">
            11140 Rockville Pike, <br>
            Suite 425, <br>
            Rockville, MD 20852
          </div>
        </div>
        <div class="col-sm-6 mb-4">
          <h5 class="header m-0">Contact</h5>
          <hr class="w-100 my-3">
          <h5 class="mb-2">General questions</h5>
          <div class="mb-4">
            <a class="text-dark" href="mailto:{{ config('app.forPhysicianGeneralQuestionEmailAddress') }}">{{ config('app.forPhysicianGeneralQuestionEmailAddress') }}</a> <br>
            <a class="text-dark" href="tel:+1-833-444-8448">+1-833-444-8448</a>
          </div>
          <h5 class="mb-2">For Healthcare Professionals</h5>
          <div class="mb-4">
            <a class="text-dark" href="mailto:phy@snyderhemband.com">phy@snyderhemband.com</a> <br>
            <a class="text-dark" href="tel:+1-833-444-8448">+1-833-444-8448</a>
          </div>
        </div>
      </div> -->
    </div>
    <div class="col-lg-6 bg-grey p-lg-5 p-4 mb-4 offset-lg-1" style="border-bottom:7px solid var(--pry-color);">
      <h4 class="subtitle">Schedule Training</h4>
      <p class="mb-4">Fill out the form below to schedule a personalized training session with our team of experts. </p>
      <form class="" action="{{ route('hcp.submit-training-request') }}" 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') }}" required />
            @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') }}" required />
            @error('name_last')
            <small class="text-warning">{{$message}}</small>
            @enderror
          </div>
          <div class="col-lg-12 form-group mb-4">
            <input type="text" class="form-control rounded-0 py-3" name="practice_name" placeholder="Practice Name" value="{{ old('practice_name') }}" required />
            @error('practice_name')
            <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="Contact Email" value="{{ old('email') }}" required />
            @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" name="phone" placeholder="Contact Phone Number" value="{{ old('phone') }}" required />
            @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') }}" required />
          @error('zip')
          <small class="text-warning">{{$message}}</small>
          @enderror
        </div>
        <div class="row">
          <div class="col-lg-6 form-group mb-4">
            <select class="form-control rounded-0 py-3" name="training_type" onchange="return showField(this, 'other')">
              <option value="">Training Type</option>
              <option value="clinical">Clinical Training</option>
              <option value="staff">Staff Training</option>
              <option value="other">Other</option>
            </select>
            @error('training_type')
            <small class="text-warning">{{$message}}</small>
            @enderror
          </div>
          <div class="col-lg-6 form-group mb-4 training_type d-none">
            <input type="text" class="form-control rounded-0 py-3" placeholder="Other training type" name="training_type_other" value="{{ old('training_type_other') }}">
            @error('training_type_other')
                <small class="text-warning">{{$message}}</small>
              @enderror
          </div>
          <div class="col-lg-6 form-group mb-4">
          <select class="form-control rounded-0 py-3" name="training_format" required>
              <option value="">Training Format</option>
              <option value="In-person">In-person</option>
              <option value="Online">Online</option>
            </select>
            @error('training_format')
            <small class="text-warning">{{$message}}</small>
            @enderror
          </div>
        </div>

        <div class="form-group mb-4">
          <textarea name="notes" class="form-control rounded-0" placeholder="Other Notes" rows="6">{{ old('notes') }}</textarea>
          @error('notes')
              <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>

<script type="text/javascript">
  function showField(_elem, _trigger) {
    var name = _elem.name;
    var val = $(_elem).val();
    if (val == _trigger) {
      $('.'+name).removeClass('d-none')
    }else {
      $('.'+name).addClass('d-none');
    }
  }
</script>


@endsection
