@extends("layouts.members")
@section('page_title')
    Add Room
@endsection
@section('page_category')
    Rooms
@endsection
<!-- HEADER -->
@section('page_action')
    <!-- Button -->
    <a href="{{ route('binshopsblog.admin.categories.index') }}" class="btn btn-primary lift">
        All Rooms
    </a>
@endsection
@section("content")
    @include('includes.flash')
    <div class="container">
        <div class="col-md-4 col-sm-offset-3 col-md-offset-3">
            <form method='post' action='{{route("admin_save_room")}}'
                  enctype="multipart/form-data">
                @csrf

                <div class="form-group">
                    <label for="room_type">Select Type</label>
                    <select id="room_type" name='room_type' class='form-control'>
                        <option value='SINGLE'> Single</option>
                        <option value='STANDARD'> Standard</option>
                        <option value='DELUX'> Deluxe</option>
                        <option value='SUITE'> Presidential Suite</option>
                    </select>
                </div>
                {{--{{dd($language_id)}}--}}
                <div class="form-group">
                    <label for="room_name">Room Name</label>
                    <input type="text" class="form-control" id="room_name" required name='room_name' value="{{old("room_name")}}">

                    <small id="room_name_help" class="form-text text-muted">The name of the Room
                    </small>
                    @if ($errors->has('room_name'))
                        <span class="invalid-feedback"
                              role="alert">
                        <strong>{{ $errors->first('room_name') }} </strong>
                    </span>
                    @endif
                </div>
                {{--{{dd($language_id)}}--}}
                <div class="form-group">
                    <label for="room_name">Room Number</label>
                    <input type="number" class="form-control" min="101" id="room_number" required name='room_number' value="{{old("room_number")}}">

                    <small id="room_name_help" class="form-text text-muted">The name of the Room
                    </small>
                    @if ($errors->has('room_number'))
                        <span class="invalid-feedback"
                              role="alert">
                        <strong>{{ $errors->first('room_number') }} </strong>
                    </span>
                    @endif
                </div>

                <div class="form-group">
                    <label for="room_description">Description (optional)</label>
                    <textarea name='room_description' class='form-control' placeholder="Enter Room Description" id='room_description'>{{old("room_description")}}</textarea>
                    @if ($errors->has('room_description'))
                        <span class="invalid-feedback"
                              role="alert">
                        <strong>{{ $errors->first('room_description') }} </strong>
                    </span>
                    @endif
                </div>


                <div class="form-group">
                    <label for="room_price">Price</label>
                    <input type="number" name="room_price" class="form-control" id="room_price" placeholder="Room Price" required value="{{old('room_price')}}">

                    @if ($errors->has('room_price'))
                        <span class="invalid-feedback"
                              role="alert">
                        <strong>{{ $errors->first('room_price') }} </strong>
                    </span>
                    @endif
                </div>

                <div class="form-group">
                    <label for="room_condition">Conditions</label>
                    <input type="text" name="room_condition" class="form-control" id="room_condition" placeholder="Room Condition"  value="{{old('room_condition')}}">

                    @if ($errors->has('room_condition'))
                        <span class="invalid-feedback"
                              role="alert">
                        <strong>{{ $errors->first('room_condition') }} </strong>
                    </span>
                    @endif
                </div>
                <input type="submit" class="btn btn-primary pull-right" value="submit">
            </form>
        </div>
    </div>



@endsection

@section('page_script')
    @include('includes.customjs')
@endsection
