@include('admin.layouts.header')
@include('admin.layouts.sidebar')
        <style>
            .form-check-input:checked {
                background-color: #0d6efd;
                border-color: #0d6efd;
            }
            
        </style>
        <!-- ============================================================== -->
        <!-- Start right Content here -->
        <!-- ============================================================== -->
        <div class="main-content">
            <div class="page-content">
                <div class="container-fluid">
                    <div class="col-lg-12">
                        <div class="card p-3 shadow-sm">
                            <form action="{{ route('guest.update') }}" method="POST" id="guestModeForm">
                                @csrf
                                <div class="d-flex align-items-center justify-content-between">
                                    <label class="form-check-label fw-semibold fs-6 mb-0" for="flexSwitchCheckDefault">
                                        Guest Mode
                                    </label>
                                    <div class="form-check form-switch">
                                        <input 
                                            class="form-check-input" 
                                            type="checkbox" 
                                            id="flexSwitchCheckDefault" 
                                            name="guest"
                                            style="width:45px; height:20px"
                                            onchange="document.getElementById('guestModeForm').submit();"
                                            {{ $web_setting->guest == 1 ? 'checked' : '' }}
                                        >
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                 
                </div>
            </div>
        </div>
@include('admin.layouts.footer')                