@extends('layouts.app')
@section('landingTitle', 'KlinikSapi.Go | Kontak Kami')
@section('content')
<section class="bg-white dark:bg-gray-900 pt-20">
  <div class="py-8 px-4 mx-auto max-w-screen-xl text-center lg:py-16">
    <h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 md:text-4xl lg:text-5xl dark:text-white">Kontak KlinikSapi.<span class="text-blue-700">Go</span></h1>
    <p class="text-lg font-normal text-gray-500 lg:text-xl sm:px-16 lg:px-48 dark:text-gray-400">Hubungi KlinikSapi.Go untuk konsultasi dan informasi lebih lanjut mengenai kesehatan sapi Anda. Kami siap membantu Anda dengan pelayanan terbaik.</p>
  </div>
</section>

<section class="flex flex-wrap gap-10 lg:px-56 lg:pb-20">
    <div class="w-full bg-white rounded-lg dark:bg-gray-800 dark:border-gray-700 mb-5" style="box-shadow: 0 0 10px rgba(13, 122, 255, 0.3);">
        <form action="{{ route('kontak.store') }}" method="post" class="w-full flex flex-wrap justify-between shadow-lg p-8" autocomplete="off">
        @csrf
        <div class="mb-6 w-full px-4">
        @if (Session::has('message'))
            <div id="alert-3" class="flex p-4 mb-4 text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400" role="alert">
                <svg aria-hidden="true" class="flex-shrink-0 w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>
                <span class="sr-only">Info</span>
                <div class="ml-3 text-sm font-medium">
                    {{ Session::get('message') }}
                </div>
                <button type="button" class="ml-auto -mx-1.5 -my-1.5 bg-green-50 text-green-500 rounded-lg focus:ring-2 focus:ring-green-400 p-1.5 hover:bg-green-200 inline-flex h-8 w-8 dark:bg-gray-800 dark:text-green-400 dark:hover:bg-gray-700" data-dismiss-target="#alert-3" aria-label="Close">
                    <span class="sr-only">Close</span>
                    <svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
                </button>
            </div>
        @endif
        </div>
        <div class="mb-6 w-1/2 px-4">
            <label for="name" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Nama Lengkap</label>
            @auth
            <input type="text" id="name" class="shadow-sm border border-gray-300 bg-gray-50 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="nama" value="{{ Auth::user()->name }}" readonly>
            @else
            <input type="text" id="name" class="shadow-sm border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="nama">
            @endauth
            @if ($errors->has('nama'))
                <strong class="text-red-600 lowercase">&nbsp;* {{ $errors->first('nama') }}</strong>
            @endif
        </div>
        <div class="mb-6 w-1/2 px-4">
            <label for="nomortelp" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Nomor Telepon</label>
            @auth
            <input type="number" id="nomortelp" class="shadow-sm border border-gray-300 bg-gray-50 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="nope" value="{{ Auth::user()->nope }}" readonly>
            @else
            <input type="number" id="nomortelp" class="shadow-sm border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="nope">
            @endauth
            @if ($errors->has('nope'))
                <strong class="text-red-600 lowercase">&nbsp;* {{ $errors->first('nope') }}</strong>
            @endif
        </div>
        <div class="mb-6 w-full px-4">
            <label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Email</label>
            @auth
            <input type="email" id="email" class="shadow-sm border border-gray-300 bg-gray-50 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="email" value="{{ Auth::user()->email }}" readonly>
            @else
            <input type="email" id="email" class="shadow-sm border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="email">
            @endauth
            @if ($errors->has('email'))
                <strong class="text-red-600 lowercase">&nbsp;* {{ $errors->first('email') }}</strong>
            @endif
        </div>
        <div class="mb-6 w-full px-4">
            <label for="subjek" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Subjek</label>
            <input type="text" id="subjek" class="shadow-sm border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" name="subjek">
            @if ($errors->has('subjek'))
                <strong class="text-red-600 lowercase">&nbsp;* {{ $errors->first('subjek') }}</strong>
            @endif
        </div>
        <div class="mb-6 w-full px-4">
            <label for="pesan" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Pesan</label>
            <textarea id="pesan" rows="8" class="block p-2.5 w-full text-sm text-gray-900 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" name="pesan"></textarea>
            @if ($errors->has('pesan'))
                <strong class="text-red-600 lowercase">&nbsp;* {{ $errors->first('pesan') }}</strong>
            @endif
        </div>
        <div class="w-full p-4">
            <button type="submit" class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-md px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Kirim</button>
        </div>
    </form>
    </div>
</section>
@endsection
