@extends('backend.layout')

@section('content')
  <div class="page-header">
    <h4 class="page-title">{{ __('Preference') }}</h4>
    <ul class="breadcrumbs">
      <li class="nav-home">
        <a href="{{ route('admin.dashboard') }}">
          <i class="flaticon-home"></i>
        </a>
      </li>
      <li class="separator">
        <i class="flaticon-right-arrow"></i>
      </li>
      <li class="nav-item">
        <a href="#">{{ __('Event Bookings') }}</a>
      </li>
      <li class="separator">
        <i class="flaticon-right-arrow"></i>
      </li>
      <li class="nav-item">
        <a href="#">{{ __('Settings') }}</a>
      </li>
      <li class="separator">
        <i class="flaticon-right-arrow"></i>
      </li>
      <li class="nav-item">
        <a href="#">{{ __('Preference') }}</a>
      </li>
    </ul>
  </div>

  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <form action="{{ route('admin.event_booking.settings.update_preference') }}" method="post">
          @csrf
          <div class="card-header">
            <div class="row">
              <div class="col-lg-10">
                <div class="card-title">{{ __('Preference') }}</div>
              </div>
            </div>
          </div>

          <div class="card-body">
            <div class="row">
              <div class="col-lg-6 offset-lg-3">
                <div class="form-group mt-1">
                  <label for="">{{ __('Guest Checkout Status') . '*' }}</label>
                  <div class="selectgroup w-100">
                    <label class="selectgroup-item">
                      <input type="radio" name="event_guest_checkout_status"
                        {{ $content->event_guest_checkout_status == 1 ? 'checked' : '' }} value="1"
                        class="selectgroup-input">
                      <span class="selectgroup-button">{{ __('Active') }}</span>
                    </label>

                    <label class="selectgroup-item">
                      <input type="radio" name="event_guest_checkout_status"
                        {{ $content->event_guest_checkout_status == 0 ? 'checked' : '' }} value="0"
                        class="selectgroup-input">
                      <span class="selectgroup-button">{{ __('Deactive') }}</span>
                    </label>
                  </div>
                </div>
              </div>
              <div class="col-lg-6 offset-lg-3">
                <div class="form-group mt-1">
                  <label for="">{{ __('How will the ticket be sent') . '*' }}</label>
                  <div class="selectgroup w-100">
                    <label class="selectgroup-item">
                      <input type="radio" name="how_ticket_will_be_send"
                        {{ $content->how_ticket_will_be_send == 'inbackground' ? 'checked' : '' }} value="inbackground"
                        class="selectgroup-input">
                      <span class="selectgroup-button">{{ __('In Background') }}</span>
                    </label>

                    <label class="selectgroup-item">
                      <input type="radio" name="how_ticket_will_be_send"
                        {{ $content->how_ticket_will_be_send == 'instant' ? 'checked' : '' }} value="instant"
                        class="selectgroup-input">
                      <span class="selectgroup-button">{{ __('Instant') }}</span>
                    </label>
                  </div>
                  <p class="text-warning">Tickets won't be sent in the background unless a cronjob is configured.</p>
                  <p class="text-warning"><strong>Your Cron Job Command :</strong> <br>
                    <code>curl -sS {{ url('/') }}/send-ticket</code>
                  </p>
                  <strong class="text-warning">Set the cron job following this video: </strong> <a
                    href="https://youtu.be/RuFJ8Ej4Vkg" target="_blank">https://youtu.be/RuFJ8Ej4Vkg</a>
                </div>
              </div>
            </div>
          </div>

          <div class="card-footer">
            <div class="row">
              <div class="col-12 text-center">
                <button type="submit" class="btn btn-success">
                  {{ __('Update') }}
                </button>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
@endsection
