<!doctype html>
<html lang="en" data-layout="vertical" data-topbar="light" data-sidebar="dark" data-sidebar-size="lg"
    data-sidebar-image="none" data-preloader="enable" data-theme="default" data-theme-colors="default">

<head>
    <meta charset="utf-8" />
    <title>Luqia | Admin Dashboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="" name="description" />
    <meta content="" name="author" />
    <!-- App favicon -->
    <link rel="shortcut icon" href="{{ asset('assets/images/favicon/ms-icon-144x144.png') }}">

    <link rel="apple-touch-icon" sizes="57x57" href="{{ asset('assets/images/favicon/apple-icon-57x57.png') }}">
    <link rel="apple-touch-icon" sizes="60x60" href="{{ asset('assets/images/favicon/apple-icon-60x60.png') }}">
    <link rel="apple-touch-icon" sizes="72x72" href="{{ asset('assets/images/favicon/apple-icon-72x72.png') }}">
    <link rel="apple-touch-icon" sizes="76x76" href="{{ asset('assets/images/favicon/apple-icon-76x76.png') }}">
    <link rel="apple-touch-icon" sizes="114x114" href="{{ asset('assets/images/favicon/apple-icon-114x114.png') }}">
    <link rel="apple-touch-icon" sizes="120x120" href="{{ asset('assets/images/favicon/apple-icon-120x120.png') }}">
    <link rel="apple-touch-icon" sizes="144x144" href="{{ asset('assets/images/favicon/apple-icon-144x144.png') }}">
    <link rel="apple-touch-icon" sizes="152x152" href="{{ asset('assets/images/favicon/apple-icon-152x152.png') }}">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/images/favicon/apple-icon-180x180.png') }}">
    <link rel="icon" type="image/png" sizes="192x192"
        href="{{ asset('assets/images/favicon/android-icon-192x192.png') }}">
    <link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/images/favicon/favicon-32x32.png') }}">
    <link rel="icon" type="image/png" sizes="96x96" href="{{ asset('assets/images/favicon/favicon-96x96.png') }}">
    <link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/images/favicon/favicon-16x16.png') }}">
    <link rel="manifest" href="{{ asset('assets/images/favicon//manifest.json') }}">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="{{ asset('assets/images/favicon/ms-icon-144x144.png') }}">
    <meta name="theme-color" content="#ffffff">

    <!-- plugin css -->
    <link href="{{ asset('assets/libs/jsvectormap/css/jsvectormap.min.css') }}" rel="stylesheet" type="text/css" />
    <!--datatable css-->
    <link rel="stylesheet" href="{{ asset('assets/css/dataTables.bootstrap5.css') }}" />
    <link rel="stylesheet" href="{{ asset('assets/libs/sweetalert2/sweetalert2.min.css') }}">

    <link href="{{ asset('assets/css/select2.min.css') }}" rel="stylesheet" />

    <!-- Bootstrap Css -->
    <link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
    <!-- Icons Css -->
    <link href="{{ asset('assets/css/icons.min.css') }}" rel="stylesheet" type="text/css" />
    <!-- App Css-->
    <link href="{{ asset('assets/css/app.min.css') }}" rel="stylesheet" type="text/css" />
    <!-- custom Css-->
    <link href="{{ asset('assets/css/custom.min.css') }}" rel="stylesheet" type="text/css" />
    <!-- custom them Css-->
    <link href="{{ asset('assets/css/custom-theme.css') }}" rel="stylesheet" type="text/css" />
    <!-- dropzone css -->
    <link rel="stylesheet" href="{{ asset('assets/libs/dropzone/dropzone.css') }}" type="text/css" />

    <!-- Filepond css -->
    <link rel="stylesheet" href="{{ asset('assets/libs/filepond/filepond.min.css') }}" type="text/css" />
    <link rel="stylesheet"
        href="{{ asset('assets/libs/filepond-plugin-image-preview/filepond-plugin-image-preview.min.css') }}">

    <meta name="csrf-token" content="{{ csrf_token() }}">
    @yield('head')
</head>

<body>

    <!-- Begin page -->
    <div id="layout-wrapper">

        <header id="page-topbar" class="header-main">
            <div class="layout-width">
                <div class="navbar-header">
                    <div class="d-flex">
                        <!-- LOGO -->
                        <div class="navbar-brand-box horizontal-logo">
                            <a href="#" class="logo logo-dark">
                                <span class="logo-sm">
                                    <img src="{{ asset('assets/images/black-logo.png') }}" alt="" height="22">
                                </span>
                                <span class="logo-lg">
                                    <img src="{{ asset('assets/images/black-logo.png') }}" alt="" height="17">
                                </span>
                            </a>

                            <a href="#" class="logo logo-light">
                                <span class="logo-sm">
                                    <img src="{{ asset('assets/images/black-logo.png') }}" alt="" height="50">
                                </span>
                                <span class="logo-lg">
                                    <img src="{{ asset('assets/images/black-logo.png') }}" alt="" height="17">
                                </span>
                            </a>
                        </div>

                        <button type="button"
                            class="btn btn-sm px-3 fs-16 header-item vertical-menu-btn topnav-hamburger material-shadow-none"
                            id="topnav-hamburger-icon">
                            <span class="hamburger-icon">
                                <span></span>
                                <span></span>
                                <span></span>
                            </span>
                        </button>

                        <!-- App Search-->
                        <form class="app-search d-none d-md-block">
                            <!-- <div class="position-relative">
                            <input type="text" class="form-control" placeholder="Search..." autocomplete="off" id="search-options" value="">
                            <span class="mdi mdi-magnify search-widget-icon"></span>
                            <span class="mdi mdi-close-circle search-widget-icon search-widget-icon-close d-none" id="search-close-options"></span>
                        </div> -->
                            <div class="dropdown-menu dropdown-menu-lg" id="search-dropdown">
                                <div data-simplebar style="max-height: 320px;">
                                    <!-- item-->
                                    <div class="dropdown-header">
                                        <h6 class="text-overflow text-muted mb-0 text-uppercase">Recent Searches</h6>
                                    </div>

                                    <div class="dropdown-item bg-transparent text-wrap">
                                        <a href="#" class="btn btn-soft-secondary btn-sm rounded-pill">how to setup <i
                                                class="mdi mdi-magnify ms-1"></i></a>
                                        <a href="#" class="btn btn-soft-secondary btn-sm rounded-pill">buttons <i
                                                class="mdi mdi-magnify ms-1"></i></a>
                                    </div>
                                    <!-- item-->
                                    <div class="dropdown-header mt-2">
                                        <h6 class="text-overflow text-muted mb-1 text-uppercase">Pages</h6>
                                    </div>

                                    <!-- item-->
                                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                                        <i class="ri-bubble-chart-line align-middle fs-18 text-muted me-2"></i>
                                        <span>Analytics Dashboard</span>
                                    </a>

                                    <!-- item-->
                                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                                        <i class="ri-lifebuoy-line align-middle fs-18 text-muted me-2"></i>
                                        <span>Help Center</span>
                                    </a>

                                    <!-- item-->
                                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                                        <i class="ri-user-settings-line align-middle fs-18 text-muted me-2"></i>
                                        <span>My account settings</span>
                                    </a>

                                    <!-- item-->
                                    <div class="dropdown-header mt-2">
                                        <h6 class="text-overflow text-muted mb-2 text-uppercase">Members</h6>
                                    </div>


                                </div>

                                <div class="text-center pt-3 pb-1">
                                    <a href="#" class="btn btn-primary btn-sm">View All Results <i
                                            class="ri-arrow-right-line ms-1"></i></a>
                                </div>
                            </div>
                        </form>
                    </div>

                    <div class="d-flex align-items-center">

                        <div class="dropdown d-md-none topbar-head-dropdown header-item">
                            <button type="button"
                                class="btn btn-icon btn-topbar material-shadow-none btn-ghost-secondary rounded-circle"
                                id="page-header-search-dropdown" data-bs-toggle="dropdown" aria-haspopup="true"
                                aria-expanded="false">
                                <i class="bx bx-search fs-22"></i>
                            </button>
                            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0"
                                aria-labelledby="page-header-search-dropdown">
                                <form class="p-3">
                                    <div class="form-group m-0">
                                        <div class="input-group">
                                            <input type="text" class="form-control" placeholder="Search ..."
                                                aria-label="Recipient's username">
                                            <button class="btn btn-primary" type="submit"><i
                                                    class="mdi mdi-magnify"></i></button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>



                        <div class="dropdown ms-sm-3 header-item topbar-user">
                            <button type="button" class="btn material-shadow-none" id="page-header-user-dropdown"
                                data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <span class="d-flex align-items-center">
                                    <img class="rounded-circle header-profile-user"
                                        src="{{ asset('assets/images/users/user-dummy-img.jpg') }}" alt="Header Avatar">
                                    <span class="text-start ms-xl-2">
                                        <span
                                            class="d-none d-xl-inline-block ms-1 fw-medium user-name-text">Admin</span>
                                        <!-- <span class="d-none d-xl-block ms-1 fs-12 user-name-sub-text">Admin</span> -->
                                    </span>
                                </span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-end">
                                <!-- item-->
                                <h6 class="dropdown-header">Welcome Admin!</h6>
                                <a class="dropdown-item" href="#" data-bs-toggle="modal" data-bs-target="#changepass"><i
                                        class="mdi mdi-key text-muted fs-16 align-middle me-1"></i> <span
                                        class="align-middle">Change Password</span></a>
                                <!-- <a class="dropdown-item" href="#"><i class="mdi mdi-map-outline text-muted fs-16 align-middle me-1"></i> <span class="align-middle">Live Map</span></a> -->
                                <!-- <a class="dropdown-item" href="#"><i class="mdi mdi-message-text-outline text-muted fs-16 align-middle me-1"></i> <span class="align-middle">Live Chat</span></a> -->
                                <!-- <a class="dropdown-item" href="#"><i class="mdi mdi-lifebuoy text-muted fs-16 align-middle me-1"></i> <span class="align-middle">Feedbacks</span></a> -->
                                <div class="dropdown-divider"></div>
                                <!-- <a class="dropdown-item" href="#"><i class="mdi mdi-wallet text-muted fs-16 align-middle me-1"></i> <span class="align-middle">Balance : <b>$5971.67</b></span></a> -->
                                <!-- <a class="dropdown-item" href="#"><i class="mdi mdi-cog-outline text-muted fs-16 align-middle me-1"></i> <span class="align-middle">Settings</span></a> -->
                                <!-- <a class="dropdown-item" href="#"><i class="mdi mdi-lock text-muted fs-16 align-middle me-1"></i> <span class="align-middle">Lock screen</span></a> -->

                                <a class="dropdown-item" href="{{ route('logout') }}"
                                    onclick="event.preventDefault(); document.getElementById('logout-form').submit();"><i
                                        class="mdi mdi-logout text-muted fs-16 align-middle me-1"></i> <span
                                        class="align-middle" data-key="t-logout">Logout</span></a>
                                <form id="logout-form" action="{{ route('logout') }}" method="POST"
                                    style="display: none;">
                                    {{ csrf_field() }}
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </header>


        <div class="modal fade" id="changepass" tabindex="-1" aria-labelledby="exampleModalgridLabel" aria-modal="true">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalgridLabel">Change Password</h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        <form action="javascript:void(0);">
                            <div class="row g-3">

                                <div class="col-xxl-6">
                                    <div>
                                        <label for="passwordInput" class="form-label">New Password</label>
                                        <input type="password" class="form-control" id="passwordInput"
                                            placeholder="New Password" value="">
                                    </div>
                                </div>

                                <div class="col-xxl-6">
                                    <div>
                                        <label for="passwordInput" class="form-label">Confirm New Password</label>
                                        <input type="password" class="form-control" id="passwordConfirmInput"
                                            placeholder="Confirm New Password" value="">
                                    </div>
                                </div>


                                <div class="col-lg-12">
                                    <div class="hstack gap-2 justify-content-end">
                                        <button type="button" class="btn btn-light"
                                            data-bs-dismiss="modal">Close</button>
                                        <button type="submit" id="changePasswordBtn"
                                            data-url="{{ route('admin.changePassword') }}"
                                            class="btn btn-primary">Submit</button>
                                    </div>
                                </div><!--end col-->
                            </div><!--end row-->
                        </form>
                    </div>
                </div>
            </div>
        </div>

        <!-- removeNotificationModal -->
        <div id="removeNotificationModal" class="modal fade zoomIn" tabindex="-1" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
                            id="NotificationModalbtn-close"></button>
                    </div>
                    <div class="modal-body">
                        <div class="mt-2 text-center">
                            <lord-icon src="https://cdn.lordicon.com/gsqxdxog.json" trigger="loop"
                                colors="primary:#f7b84b,secondary:#f06548" style="width:100px;height:100px"></lord-icon>
                            <div class="mt-4 pt-2 fs-15 mx-4 mx-sm-5">
                                <h4>Are you sure ?</h4>
                                <p class="text-muted mx-4 mb-0">Are you sure you want to remove this Notification ?</p>
                            </div>
                        </div>
                        <div class="d-flex gap-2 justify-content-center mt-4 mb-2">
                            <button type="button" class="btn w-sm btn-light" data-bs-dismiss="modal">Close</button>
                            <button type="button" class="btn w-sm btn-danger" id="delete-notification">Yes, Delete
                                It!</button>
                        </div>
                    </div>

                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        <!-- ========== App Menu ========== -->
        <div class="app-menu navbar-menu">
            <!-- LOGO -->
            <div class="navbar-brand-box">
                <!-- Dark Logo-->
                <a href="#" class="logo logo-dark">
                    <span class="logo-sm">
                        <img src="{{ asset('') }}assets/images/black-logo.png" alt="" height="22">
                    </span>
                    <span class="logo-lg">
                        <img src="{{ asset('') }}assets/images/black-logo.png" alt="" height="17">
                    </span>
                </a>

                <!-- Light Logo-->
                <a href="#" class="logo logo-light">
                    <span class="logo-sm">
                        <img src="{{ asset('') }}assets/images/black-logo.png" alt="" height="22">
                    </span>
                    <span class="logo-lg">
                        <img src="{{ asset('') }}assets/images/black-logo.png" alt="" height="50">
                    </span>
                </a>
                <button type="button" class="btn btn-sm p-0 fs-20 header-item float-end btn-vertical-sm-hover"
                    id="vertical-hover">
                    <i class="ri-record-circle-line"></i>
                </button>
            </div>

            <div class="dropdown sidebar-user m-1 rounded">
                <button type="button" class="btn material-shadow-none" id="page-header-user-dropdown"
                    data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <span class="d-flex align-items-center gap-2">
                        <img class="rounded header-profile-user"
                            src="{{ asset('') }}assets/images/users/user-dummy-img.jpg" alt="Header Avatar">
                        <span class="text-start">
                            <span class="d-block fw-medium sidebar-user-name-text">Anna Adame</span>
                            <span class="d-block fs-14 sidebar-user-name-sub-text"><i
                                    class="ri ri-circle-fill fs-10 text-success align-baseline"></i> <span
                                    class="align-middle">Online</span></span>
                        </span>
                    </span>
                </button>
                <div class="dropdown-menu dropdown-menu-end">
                    <!-- item-->
                    <h6 class="dropdown-header">Welcome Anna!</h6>
                    <a class="dropdown-item" href="#"><i
                            class="mdi mdi-account-circle text-muted fs-16 align-middle me-1"></i> <span
                            class="align-middle">Profile</span></a>
                    <a class="dropdown-item" href="#"><i
                            class="mdi mdi-message-text-outline text-muted fs-16 align-middle me-1"></i> <span
                            class="align-middle">Messages</span></a>
                    <a class="dropdown-item" href="#"><i
                            class="mdi mdi-calendar-check-outline text-muted fs-16 align-middle me-1"></i> <span
                            class="align-middle">Taskboard</span></a>
                    <a class="dropdown-item" href="#"><i
                            class="mdi mdi-lifebuoy text-muted fs-16 align-middle me-1"></i> <span
                            class="align-middle">Help</span></a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#"><i class="mdi mdi-wallet text-muted fs-16 align-middle me-1"></i>
                        <span class="align-middle">Balance : <b>$5971.67</b></span></a>
                    <a class="dropdown-item" href="#"><span
                            class="badge bg-success-subtle text-success mt-1 float-end">New</span><i
                            class="mdi mdi-cog-outline text-muted fs-16 align-middle me-1"></i> <span
                            class="align-middle">Settings</span></a>
                    <a class="dropdown-item" href="#"><i class="mdi mdi-lock text-muted fs-16 align-middle me-1"></i>
                        <span class="align-middle">Lock screen</span></a>
                    <a class="dropdown-item" href="#"><i class="mdi mdi-logout text-muted fs-16 align-middle me-1"></i>
                        <span class="align-middle" data-key="t-logout">Logout</span></a>
                </div>
            </div>
            <div id="scrollbar">
                <div class="container-fluid">


                    <div id="two-column-menu">
                    </div>
                    <ul class="navbar-nav" id="navbar-nav">
                        <li class="menu-title"><span data-key="t-menu">Menu</span></li>
                        <li class="nav-item">
                            <a class="nav-link menu-link {{ request()->routeIs('admin.dashboard') ? 'active' : '' }}"
                                href="{{ route('admin.dashboard') }}" role="button" aria-expanded="false">
                                <i class="ri-dashboard-2-line"></i> <span data-key="t-dashboards">Dashboards</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link" href="#website-1" data-bs-toggle="collapse" role="button"
                                aria-expanded="{{ request()->routeIs('admin.users.female', 'admin.users.male', 'admin.users.mother_certificate_verification') ? 'true' : 'false' }}"
                                aria-controls="sidebarAdvanceUI">
                                <i class="ri-user-line"></i> <span data-key="t-advance-ui">Users</span>
                            </a>
                            <div class="collapse menu-dropdown {{ request()->routeIs('admin.users.female', 'admin.users.male', 'admin.users.mother_certificate_verification') ? 'show' : '' }}"
                                id="website-1">
                                <ul class="nav nav-sm flex-column">
                                    <li class="nav-item">
                                        <a class="nav-link menu-link {{ request()->routeIs('admin.users.male') ? 'active' : '' }}"
                                            href="{{ route('admin.users.male') }}" role="button" aria-expanded="false">
                                            <i class="ri-user-line"></i> <span data-key="t-dashboards">Male</span>
                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link menu-link {{ request()->routeIs('admin.users.female') ? 'active' : '' }}"
                                            href="{{ route('admin.users.female') }}" role="button"
                                            aria-expanded="false">
                                            <i class="ri-user-line"></i> <span data-key="t-dashboards">Female</span>
                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link menu-link {{ request()->routeIs('admin.users.mother_certificate_verification') ? 'active' : '' }}"
                                            href="{{ route('admin.users.mother_certificate_verification') }}" role="button"
                                            aria-expanded="false">
                                            <i class="ri-checkbox-circle-line"></i> <span data-key="t-dashboards">Verify Mother Document</span>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link {{ request()->routeIs('admin.match.requests*') ? 'active' : '' }}"
                                href="{{ route('admin.match.requests') }}" role="button" aria-expanded="false">
                                <i class="ri-heart-line"></i> <span data-key="t-dashboards">Match Requests</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link {{ request()->routeIs('admin.plans') ? 'active' : '' }}"
                                href="{{ route("admin.plans") }}" role="button" aria-expanded="false">
                                <i class="ri-coupon-line"></i> <span data-key="t-dashboards">Subscription Plans</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link {{ request()->routeIs('admin.promos') ? 'active' : '' }}"
                                href="{{ route("admin.promos") }}" role="button" aria-expanded="false">
                                <i class="ri-coupon-line"></i> <span data-key="t-dashboards">Coupons & Discount</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link {{ request()->routeIs('admin.support', 'admin.support.show') ? 'active' : '' }}"
                                href="{{ route("admin.support") }}" role="button" aria-expanded="false">
                                <i class="ri-customer-service-line"></i> <span data-key="t-dashboards">Support</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link {{ request()->routeIs('admin.notifications', 'admin.notifications.create', 'admin.notifications.edit') ? 'active' : '' }}"
                                href="{{ route("admin.notifications") }}" role="button" aria-expanded="false">
                                <i class="ri-alarm-warning-line"></i> <span data-key="t-dashboards">Notifications</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link" href="#website-3" data-bs-toggle="collapse" role="button"
                                aria-expanded="{{ request()->routeIs('admin.countries', 'admin.countries.edit', 'admin.countries.create', 'admin.nationalities', 'admin.nationalities.edit', 'admin.nationalities.create', 'admin.emirates', 'admin.emirates.edit', 'admin.emirates.create', 'admin.languages', 'admin.languages.edit', 'admin.languages.create', 'admin.sects', 'admin.sects.edit', 'admin.sects.create', 'admin.educations', 'admin.educations.edit', 'admin.educations.create', 'admin.professions', 'admin.professions.edit', 'admin.professions.create', 'admin.marital_statuses', 'admin.marital_statuses.edit', 'admin.marital_statuses.create', 'admin.dress_codes', 'admin.dress_codes.edit', 'admin.dress_codes.create', 'admin.genetic_diseases', 'admin.genetic_diseases.edit', 'admin.genetic_diseases.create', 'admin.activities', 'admin.activities.edit', 'admin.activities.create', 'admin.sports', 'admin.sports.edit', 'admin.sports.create', 'admin.report_types', 'admin.report_types.edit', 'admin.report_types.create', 'admin.homelogos', 'admin.homelogos.edit', 'admin.homelogos.create') ? 'true' : 'false' }}"
                                aria-controls="sidebarAdvanceUI">
                                <i class="ri-layout-masonry-line"></i> <span data-key="t-advance-ui">Master</span>
                            </a>
                            <div class="collapse menu-dropdown {{ request()->routeIs('admin.countries', 'admin.countries.edit', 'admin.countries.create', 'admin.employments', 'admin.employments.edit', 'admin.employments.create', 'admin.nationalities', 'admin.nationalities.edit', 'admin.nationalities.create', 'admin.emirates', 'admin.emirates.edit', 'admin.emirates.create', 'admin.languages', 'admin.languages.edit', 'admin.languages.create', 'admin.sects', 'admin.sects.edit', 'admin.sects.create', 'admin.educations', 'admin.educations.edit', 'admin.educations.create', 'admin.professions', 'admin.professions.edit', 'admin.professions.create', 'admin.marital_statuses', 'admin.marital_statuses.edit', 'admin.marital_statuses.create', 'admin.dress_codes', 'admin.dress_codes.edit', 'admin.dress_codes.create', 'admin.genetic_diseases', 'admin.genetic_diseases.edit', 'admin.genetic_diseases.create', 'admin.activities', 'admin.activities.edit', 'admin.activities.create', 'admin.sports', 'admin.sports.edit', 'admin.sports.create', 'admin.report_types', 'admin.report_types.edit', 'admin.report_types.create', 'admin.homelogos', 'admin.homelogos.edit', 'admin.homelogos.create') ? 'show' : '' }}"
                                id="website-3">
                                <ul class="nav nav-sm flex-column">
                                    <li class="nav-item">
                                        <a href="{{ route("admin.employments") }}"
                                            class="nav-link {{ request()->routeIs('admin.employments', 'admin.employments.edit', 'admin.employments.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Employments</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.emirates") }}"
                                            class="nav-link {{ request()->routeIs('admin.emirates', 'admin.emirates.edit', 'admin.emirates.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Emirates</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.countries") }}"
                                            class="nav-link {{ request()->routeIs('admin.countries', 'admin.countries.edit', 'admin.countries.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Countries</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.nationalities") }}"
                                            class="nav-link {{ request()->routeIs('admin.nationalities', 'admin.nationalities.edit', 'admin.nationalities.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Nationalities</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.languages") }}"
                                            class="nav-link {{ request()->routeIs('admin.languages', 'admin.languages.edit', 'admin.languages.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Languages</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.sects") }}"
                                            class="nav-link {{ request()->routeIs('admin.sects', 'admin.sects.edit', 'admin.sects.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Sects</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.educations") }}"
                                            class="nav-link {{ request()->routeIs('admin.educations', 'admin.educations.edit', 'admin.educations.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Education</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.professions") }}"
                                            class="nav-link {{ request()->routeIs('admin.professions', 'admin.professions.edit', 'admin.professions.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Profession</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.marital_statuses") }}"
                                            class="nav-link {{ request()->routeIs('admin.marital_statuses', 'admin.marital_statuses.edit', 'admin.marital_statuses.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Marital Status</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.dress_codes") }}"
                                            class="nav-link {{ request()->routeIs('admin.dress_codes', 'admin.dress_codes.edit', 'admin.dress_codes.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Dress Code</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.genetic_diseases") }}"
                                            class="nav-link {{ request()->routeIs('admin.genetic_diseases', 'admin.genetic_diseases.edit', 'admin.genetic_diseases.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Genetic Disease</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.chronic_diseases") }}"
                                            class="nav-link {{ request()->routeIs('admin.chronic_diseases', 'admin.chronic_diseases.edit', 'admin.chronic_diseases.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Chronic Disease</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.activities") }}"
                                            class="nav-link {{ request()->routeIs('admin.activities', 'admin.activities.edit', 'admin.activities.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Activity</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.sports") }}"
                                            class="nav-link {{ request()->routeIs('admin.sports', 'admin.sports.edit', 'admin.sports.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Sport</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.report_types") }}"
                                            class="nav-link {{ request()->routeIs('admin.report_types', 'admin.report_types.edit', 'admin.report_types.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Report Type</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.homelogos") }}"
                                            class="nav-link {{ request()->routeIs('admin.homelogos', 'admin.homelogos.edit', 'admin.homelogos.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">App Icons</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.chat_categories") }}"
                                            class="nav-link {{ request()->routeIs('admin.chat_categories', 'admin.chat_categories.edit', 'admin.chat_categories.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Chat Categories</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.questions") }}"
                                            class="nav-link {{ request()->routeIs('admin.questions', 'admin.questions.edit', 'admin.questions.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Questions</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.answers") }}"
                                            class="nav-link {{ request()->routeIs('admin.answers', 'admin.answers.edit', 'admin.answers.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Answers</a>
                                    </li>
                                </ul>
                            </div>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link menu-link" href="#website-2" data-bs-toggle="collapse" role="button"
                                aria-expanded="{{ request()->routeIs('admin.pages.show', 'admin.faq', 'admin.faq.edit', 'admin.faq.create', 'admin.site_page_details', 'admin.home_page_details', 'admin.badges', 'admin.badges.edit', 'admin.badges.create') && in_array(request()->page, ['about-us', 'terms-and-conditions', 'video-guide', 'privacy-policy', 'blur-guidance', 'show-and-hide-guidance']) ? 'true' : 'false' }}"
                                aria-controls="sidebarAdvanceUI">
                                <i class="ri-file-text-line"></i> <span data-key="t-advance-ui">CMS</span>
                            </a>
                            <div class="collapse menu-dropdown {{ (request()->routeIs('admin.pages.show') && in_array(request('page'), ['about-us', 'terms-and-conditions', 'video-guide', 'privacy-policy', 'blur-guidance', 'show-and-hide-guidance'])) || request()->routeIs('admin.faq', 'admin.faq.edit', 'admin.faq.create', 'admin.site_page_details', 'admin.home_page_details', 'admin.badges', 'admin.badges.edit', 'admin.badges.create', 'admin.banners', 'admin.banners.edit', 'admin.banners.create') ? 'show' : '' }}"
                                id="website-2">
                                <ul class="nav nav-sm flex-column">
                                    <li class="nav-item">
                                        <a href="{{ route('admin.pages.show', ['page' => 'about-us']) }}"
                                            class="nav-link {{ (request()->routeIs('admin.pages.show') && in_array(request('page'), ['about-us'])) ? 'active' : '' }}"
                                            data-key="t-sweet-alerts">About Us</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route('admin.pages.show', ['page' => 'terms-and-conditions']) }}"
                                            class="nav-link {{ request()->routeIs('admin.pages.show') && request()->page == 'terms-and-conditions' ? 'active' : '' }}"
                                            data-key="t-nestable-list">Terms and Conditions</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route('admin.pages.show', ['page' => 'photo-guide']) }}"
                                            class="nav-link {{ request()->routeIs('admin.pages.show') && request()->page == 'video-guide' ? 'active' : '' }}"
                                            data-key="t-nestable-list">Photo Guide</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route('admin.pages.show', ['page' => 'privacy-policy']) }}"
                                            class="nav-link {{ request()->routeIs('admin.pages.show') && request()->page == 'privacy-policy' ? 'active' : '' }}"
                                            data-key="t-nestable-list">Privacy Policy</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route('admin.pages.show', ['page' => 'blur-guidance']) }}"
                                            class="nav-link {{ request()->routeIs('admin.pages.show') && request()->page == 'blur-guidance' ? 'active' : '' }}"
                                            data-key="t-nestable-list">Blur Guidance</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route('admin.pages.show', ['page' => 'show-and-hide-guidance']) }}"
                                            class="nav-link {{ request()->routeIs('admin.pages.show') && request()->page == 'show-and-hide-guidance' ? 'active' : '' }}"
                                            data-key="t-nestable-list">Show and hide guidance</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{ route("admin.badges") }}"
                                            class="nav-link {{ request()->routeIs('admin.badges', 'admin.badges.edit', 'admin.badges.create') ? 'active' : '' }}"
                                            data-key="t-nestable-list">Badges</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link menu-link" href="#website-5" data-bs-toggle="collapse" role="button"
                                aria-expanded="{{ request()->routeIs('admin.reports.malecustomeregistration', 'admin.reports.femalecustomeregistration', 'admin.reports.matchmakingreport', 'admin.reports.matchmakingreport.details', 'admin.reports.paymentreport') ? 'true' : 'false' }}"
                                aria-controls="sidebarAdvanceUI">
                                <i class="ri-line-chart-line"></i> <span data-key="t-advance-ui">Reports</span>
                            </a>
                            <div class="collapse menu-dropdown {{ request()->routeIs('admin.reports.malecustomeregistration', 'admin.reports.femalecustomeregistration', 'admin.reports.matchmakingreport', 'admin.reports.matchmakingreport.details', 'admin.reports.paymentreport') ? 'show' : '' }}"
                                id="website-5">
                                <ul class="nav nav-sm flex-column">
                                    <li class="nav-item">
                                        <a href="{{route('admin.reports.malecustomeregistration')}}"
                                            class="nav-link {{ request()->routeIs('admin.reports.malecustomeregistration') ? 'active' : '' }}"
                                            data-key="t-sweet-alerts">Male Registration</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{route('admin.reports.femalecustomeregistration')}}"
                                            class="nav-link {{ request()->routeIs('admin.reports.femalecustomeregistration') ? 'active' : '' }}"
                                            data-key="t-sweet-alerts">Female Registration</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{route('admin.reports.matchmakingreport')}}"
                                            class="nav-link {{ request()->routeIs('admin.reports.matchmakingreport', 'admin.reports.matchmakingreport.details') ? 'active' : '' }}"
                                            data-key="t-sweet-alerts">Matchmaking</a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="{{route('admin.reports.paymentreport')}}"
                                            class="nav-link {{ request()->routeIs('admin.reports.paymentreport') ? 'active' : '' }}"
                                            data-key="t-sweet-alerts">Payment Report</a>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
                <!-- Sidebar -->
            </div>

            <div class="sidebar-background"></div>
        </div>
        <!-- Left Sidebar End -->
        <!-- Vertical Overlay-->
        <div class="vertical-overlay"></div>


        <div class="main-content">

            <div class="page-content">


                <div class="container-fluid">

                    @yield('content')
                </div>
                <!-- End Page-content -->

                <footer class="footer">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-sm-6">
                                <script>document.write(new Date().getFullYear())</script> © Luqia.
                            </div>
                            <!-- <div class="col-sm-6">
                            <div class="text-sm-end d-none d-sm-block">
                                Design & Develop by Themesbrand
                            </div>
                        </div> -->
                        </div>
                    </div>
                </footer>
            </div>
            <!-- end main content-->

        </div>
        <!-- END layout-wrapper -->

        <!--start back-to-top-->
        <button onclick="topFunction()" class="btn btn-danger btn-icon" id="back-to-top">
            <i class="ri-arrow-up-line"></i>
        </button>
        <!--end back-to-top-->

        <!--preloader-->
        <div id="preloader">
            <div id="status">
                <div class="spinner-border text-primary avatar-sm" role="status">
                    <span class="visually-hidden">Loading...</span>
                </div>
            </div>
        </div>
        <!-- Layout config Js -->
        <script src="{{ asset('assets/js/layout.js') }}"></script>
        <!-- JAVASCRIPT -->
        <script src="{{ asset('assets/js/jquery-3.7.1.js') }}"></script>
        <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
        <script src="{{ asset('assets/libs/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
        <script src="{{ asset('assets/libs/simplebar/simplebar.min.js') }}"></script>
        <script src="{{ asset('assets/libs/node-waves/waves.min.js') }}"></script>
        <script src="{{ asset('assets/libs/feather-icons/feather.min.js') }}"></script>
        <script src="{{ asset('assets/js/pages/plugins/lord-icon-2.1.0.js') }}"></script>
        <script src="{{ asset('assets/libs/flatpickr/flatpickr.min.js') }}"></script>
        {{--
        <script src="{{ asset('assets/js/plugins.js') }}"></script>--}}

        <!--datatable js-->
        <script src="{{ asset('assets/js/dataTables.js') }}"></script>
        <script src="{{ asset('assets/js/dataTables.bootstrap5.js') }}"></script>

        <!--select2 cdn-->
        <script src="{{ asset('assets/js/select2.min.js') }}"></script>

        <script src="{{ asset('assets/js/pages/select2.init.js') }}"></script>

        <!-- apexcharts -->
        <script src="{{ asset('assets/libs/apexcharts/apexcharts.min.js') }}"></script>

        <!-- Vector map-->
        <script src="{{ asset('assets/libs/jsvectormap/js/jsvectormap.min.js') }}"></script>
        <script src="{{ asset('assets/libs/jsvectormap/maps/world-merc.js') }}"></script>

        <!-- Dashboard init -->
        <script src="{{ asset('assets/js/pages/dashboard-crm.init.js') }}"></script>
        <script src="{{ asset('assets/js/pages/dashboard-analytics.init.js') }}"></script>

        <!-- prismjs plugin -->
        <script src="{{ asset('assets/libs/prismjs/prism.js') }}"></script>


        <!-- App js -->
        <script src="{{ asset('assets/js/app.js') }}"></script>

        <script type="text/javascript" src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
        <script type="text/javascript">const ASSET_PATH = "{{ asset('assets/images') }}";</script>
        <script type="text/javascript" src="{{ asset('assets/js/custom.js') }}"></script>
        <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.css" rel="stylesheet">

        <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.js"></script>

    </div>
    @yield('script')
    
    <!-- Match Request Notification Polling Script -->
    <script>
    // Poll for new match notifications every 2 seconds
    let notificationCheckInterval;
    let shownNotifications = new Set();
    let notificationSound = new Audio('{{ asset("assets/sounds/pooja-bell-fast-415391.mp3") }}');
    notificationSound.loop = true;
    let audioEnabled = false;

    // Enable audio on first user interaction (to bypass browser autoplay policy)
    function enableAudio() {
        if (!audioEnabled) {
            notificationSound.load();
            // Try to play and immediately pause to unlock audio
            notificationSound.play().then(() => {
                notificationSound.pause();
                notificationSound.currentTime = 0;
                audioEnabled = true;
            }).catch(() => {
                // Audio still locked, will try again on next interaction
            });
        }
    }

    // Add event listeners for user interaction
    document.addEventListener('click', enableAudio, { once: true });
    // document.addEventListener('keydown', enableAudio, { once: true });

    function checkNewMatchNotifications() {
        $.ajax({
            url: '{{ route("admin.match.requests.check") }}',
            method: 'GET',
            success: function(response) {
                if (response.status === 'success') {
                    
                    // Update dashboard notification strip
                    if (response.count > 0) {
                         updateNotificationStrip(response.notifications);
                         // Play continuous sound if notifications exist
                         if (notificationSound.paused && audioEnabled) {
                             notificationSound.play().catch(function(error) {
                                 console.log('Could not play notification sound:', error);
                             });
                         }
                    } else {
                        // Stop sound if no notifications
                        $('#match-notification-strip-container').empty();
                        if (!notificationSound.paused) {
                            notificationSound.pause();
                            notificationSound.currentTime = 0;
                        }
                    }
                }
            },
            error: function(xhr, status, error) {
                console.error('Error checking match notifications:', error);
            }
        });
    }

    function updateNotificationStrip(notifications) {
        const container = $('#match-notification-strip-container');
        if (!container.length) return; // Only update if container exists (on dashboard)
        
        container.empty();
        
        notifications.forEach(function(notification) {
            const strip = `
                <div class="alert alert-info alert-dismissible fade show mb-3" role="alert" style="cursor: pointer;">
                    <div onclick="window.location.href='${notification.detail_url}'">
                        <i class="ri-heart-fill me-2"></i>
                        <strong>New Match Request!</strong> 
                        ${notification.male_name} and ${notification.female_name} have agreed to match. 
                        <span class="text-muted small">(${notification.created_at})</span>
                        <br>
                        <small>Click here to view details</small>
                    </div>
                    <button type="button" class="btn-close" onclick="event.stopPropagation(); dismissNotification(${notification.id})"></button>
                </div>
            `;
            container.append(strip);
        });
    }

    function dismissNotification(notificationId) {
        // Mark as read
        $.post('{{ route("admin.match.requests.mark_read", ":id") }}'.replace(':id', notificationId), {
            _token: '{{ csrf_token() }}'
        }, function() {
            // Remove from shown notifications
            shownNotifications.delete(notificationId);
            // Refresh notifications
            checkNewMatchNotifications();
        });
    }

    // Start polling when page loads
    $(document).ready(function() {
        // Check immediately on load
        checkNewMatchNotifications();
        
        // Then check every 2 seconds
        notificationCheckInterval = setInterval(checkNewMatchNotifications, 2000);
    });

    // Clean up interval when page unloads
    $(window).on('beforeunload', function() {
        if (notificationCheckInterval) {
            clearInterval(notificationCheckInterval);
        }
    });
    </script>
</body>


</html>