<form class="row g-3 auto-width room" action="{{ route('rooms.store') }}" method="post" enctype='multipart/form-data'
    id="room">
    @csrf
    

     <!-- Room Number -->
     <div class="col-md-12">
        <label for="name" class="form-label">Room Number <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="room_number" name="room_number" aria-describedby="inputGroupPrepend" placeholder="Example:- 001" required>
        <span class="text-danger error_room_number" style="display:none;">This field is required.</span>
    </div>
    <!-- Room Name -->
    <div class="col-md-12">
        <label for="name" class="form-label">Room  Name<span class="text-danger"></span></label>
        <input type="text" class="form-control" id="room_name" name="room_name" aria-describedby="inputGroupPrepend" placeholder="Enter Room Name" required>
        <span class="text-danger error_room_name" style="display:none;">This field is required.</span>
    </div>

    <!-- Building -->
    <div class="col-md-6">
        <div>
            <label for="building_id" class="form-label">Building <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="form-control" name="building_id">
                @foreach($building as $list)
                <option value="{{ $list->id }}">{{ $list->name }}</option>
                @endforeach
            </select>
            <div class="input-group-append" style="margin: auto 10px;">
                <button class="btn btn-success add_btn" id="create_building_create" type="button"> + </button>
            </div>
        </div>
        <span class="text-danger error_floor_id" style="display: none;">This field is required.</span>
    </div>

    <!-- FLoor -->
    <div class="col-md-6">
        <div>
            <label for="floor_id" class="form-label">Floor <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="form-control" name="floor_id">
                @foreach($floor as $list)
                <option value="{{ $list->id }}">{{ $list->name }}</option>
                @endforeach
            </select>
            <div class="input-group-append" style="margin: auto 10px;">
                <button class="btn btn-success add_btn" id="floor_create_button" type="button"> + </button>
            </div>
        </div>
        <span class="text-danger error_floor_id" style="display: none;">This field is required.</span>
    </div>
   
    
    <div class="col-md-6">
        <label for="priority" class="form-label">Priority <span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" name="priority" aria-describedby="inputGroupPrepend" required value="{!! $priority + 1 !!}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>

</form>
