<!doctype html>
<html lang="en" dir="ltr">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>@yield('title', 'Admin') | JRK</title>
    <link rel="preconnect" href="https://fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=noto-naskh-arabic:400,500,600,700|outfit:400,500,600,700" rel="stylesheet">
    @vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="admin-body">
    <aside class="admin-sidebar">
        <a class="admin-brand" href="{{ route('admin.dashboard') }}">
            <img src="{{ asset('images/logo.png') }}" alt="">
            <span>JRK Admin</span>
        </a>
        <nav>
            <a href="{{ route('admin.dashboard') }}">Dashboard</a>
            <a href="{{ route('admin.users.index') }}">Users</a>
            <a href="{{ route('admin.pages.index') }}">Website Pages</a>
            <a href="{{ route('admin.questions.index') }}">Darul Ifta</a>
            <a href="{{ route('home') }}">View Site</a>
        </nav>
        <form method="post" action="{{ route('logout') }}">
            @csrf
            <button class="btn btn-ghost" type="submit">Logout</button>
        </form>
    </aside>

    <main class="admin-main">
        @if (session('status'))
            <div class="flash-message" role="status">{{ session('status') }}</div>
        @endif
        @yield('content')
    </main>
</body>
</html>
