
@extends('app.admin.layout.layout')
@section('title',__('All Room Categories'))
@section('content')
<br>
<main>
	<div class="container">
		<div class="row">
			<div class="col">
				<div>

                    <div class="page-title-container">
                        <div class="row">
                            <div class="col-sm-12 col-md-6 col-lg-4">
                                <h1 class="mb-0 pb-0 display-4" id="title">@lang('All Room Categories')</h1>
                                <nav class="breadcrumb-container d-inline-block" aria-label="breadcrumb">
                                    <ul class="breadcrumb pt-0">
                                        <li class="breadcrumb-item"><a href="{{ route('admin:home') }}">@lang('Home')</a></li>
                                        <li class="breadcrumb-item"><a href="{{ route('admin:roomCategories.index') }}">@lang('Room Categories')</a></li>
                                    </ul>
                                </nav>
                            </div>

                            <div class="col-sm-12 col-md-6 col-lg-4 mb-2 d-flex align-items-start justify-content-center">
                                <form action="{{ route('admin:menuCategories.search') }}" method="GET" class="d-inline-block w-100">
                                    <div class="input-group w-100">
                                        <input type="text" name="query" class="form-control" placeholder="Ara..." required>
                                        <button type="submit" class="btn btn-outline-primary">
                                            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="acorn-icons acorn-icons-search undefined">
                                                <circle cx="11" cy="11" r="8"></circle>
                                                <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
                                            </svg>
                                        </button>
                                    </div>
                                </form>
                            </div>

                            <div class="col-sm-12 col-md-6 col-lg-4 d-flex align-items-start justify-content-end three">
                                <a href="{{ route('admin:menyus.index') }}">
                                    <button type="button" class="btn btn-outline-primary btn-icon btn-icon-start w-100 w-md-auto">
                                        <i data-acorn-icon="leaf" class="me-2" data-acorn-size="17"></i>
                                        <span>@lang('All Rooms')</span>
                                    </button>
                                </a>
                                <a href="{{ route('admin:menuCategories.create') }}">
                                    <button type="button" class="btn btn-outline-primary btn-icon btn-icon-start w-100 w-md-auto">
                                        <i data-acorn-icon="plus" class="me-2" data-acorn-size="17"></i>
                                        <span>@lang('Create new Category')</span>
                                    </button>
                                </a>
                                <div class="ms-1">
                                    <button type="button" class="btn btn-outline-primary btn-icon btn-icon-only" data-bs-offset="0,3" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-submenu="">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="acorn-icons acorn-icons-more-horizontal undefined">
                                            <path d="M9 10C9 9.44772 9.44772 9 10 9V9C10.5523 9 11 9.44772 11 10V10C11 10.5523 10.5523 11 10 11V11C9.44772 11 9 10.5523 9 10V10zM2 10C2 9.44772 2.44772 9 3 9V9C3.55228 9 4 9.44772 4 10V10C4 10.5523 3.55228 11 3 11V11C2.44772 11 2 10.5523 2 10V10zM16 10C16 9.44772 16.4477 9 17 9V9C17.5523 9 18 9.44772 18 10V10C18 10.5523 17.5523 11 17 11V11C16.4477 11 16 10.5523 16 10V10z"></path>
                                        </svg>
                                    </button>
                                    <div class="dropdown-menu dropdown-menu-end">
                                        @foreach ($roomCategories as $roomCategory)
                                            <button class="dropdown-item" type="button">{{ $roomCategory->room_category() }}</button>
                                        @endforeach
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <style>
                        .input-group {
                            width: 100%;
                        }
                        .form-control {
                            width: 100%;
                        }
                        @media(max-width: 768px ){
                            .nosee{
                                display: none !important;
                            }
                        }
                        @media(max-width: 425px){
                            .three{
                                flex-direction: column !important;
                            }
                            .three a{
                                width: 100%;
                            }
                            .three div{

                            }
                        }
                    </style>



					<div class="row">
						<div class="col-xl-12 mb-5">
							<section class="scroll-section" id="userButtons">
								<h2 class="small-title">@lang('All Categories')</h2>
								<div class="card h-100-card">
									<div class="card-body mb-n2 border-last-none h-100">
                                        @if (isset($roomCategories))
                                        @foreach ($roomCategories as $roomCategory) <div class="border-bottom border-separator-light mb-2 pb-2">
                                            {{--  <a href="{{ route('admin:menyus.index', ['category_id' => $menuCategory->id]) }}">  --}}
                                            <div class="row g-0 ">
                                                    <div class="col-lg-2 col-md-2 col-sm-4 col-3">
                                                        <img src="{{ $roomCategory->image() }}" class="card-img rounded-xl sh-6 sw-6" alt="{{ $roomCategory->room_category() }}">
                                                    </div>
                                                   <div class="col-lg-6 col-md-6 col-sm-4 col-4">
                                                    <div class="card-body d-flex flex-row pt-0 pb-0 ps-3 pe-0 h-100 align-items-center justify-content-between">
														<div class="d-flex flex-column">
															<div>{{ $roomCategory->room_category() }}</div>
															<div class="text-small text-muted">{{ $roomCategory->room_category() }}</div>
														</div>
														<div class="d-flex nosee">
															<div>{{ $roomCategory->getAttribute('room_category_az') }}</div>
														</div>
														<div class="d-flex nosee">
															<div>{{ $roomCategory->getAttribute('room_category_ru') }}</div>
														</div>
														<div class="d-flex nosee">
															<div>{{ $roomCategory->getAttribute('room_category_en') }}</div>
														</div>
														<div class="d-flex nosee">
															<div>{{ $roomCategory->getAttribute('created_at') }}</div>
														</div>
                                                    </div>
                                                   </div>
												<div class="col-lg-4 col-md-4 col-sm-4 col-5">
													<div class="card-body d-flex flex-row pt-0 pb-0 ps-3 pe-0 h-100 align-items-center justify-content-between">

														<div class="d-flex">
                                                            <button class="btn btn-outline-secondary btn-sm ms-1"  type="button">
                                                                <a href="{{ route('admin:roomCategories.edit',$roomCategory->getAttribute('id')) }}">
                                                                    <i data-acorn-icon="pen" class="text-primary me-1" data-acorn-size="15"></i>
                                                                </a>
                                                            </button>
															<button class="btn btn-outline-secondary btn-sm ms-1" type="button">
                                                                <a href="{{ route('admin:roomCategories.destroy',$roomCategory->getAttribute('id')) }}">
                                                                    <i data-acorn-icon="bin" class="text-primary me-1" data-acorn-size="15"></i>
                                                                </a>
                                                            </button>
														</div>
													</div>
												</div>
											</div>
										</div>
                                     @endforeach
                                     @endif
                                    </div>
								</div>
							</section>
						</div>
					</div>
				</div>
			</div>
		</div>
</main>
@endsection


