<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="remember-theme">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>@yield('title', 'LineUp France · Administration BO')</title>

    <meta name="description" content="Administration LineUp France">
    <meta name="robots" content="noindex, nofollow">

    <link rel="shortcut icon" href="{{ asset('oneui/media/favicons/favicon.png') }}">
    <link rel="icon" sizes="192x192" type="image/png" href="{{ asset('oneui/media/favicons/favicon-192x192.png') }}">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('oneui/media/favicons/apple-touch-icon-180x180.png') }}">

    <link rel="stylesheet" href="{{ asset('oneui/build/assets/main-ByGuklYT.css') }}">
    <link rel="stylesheet" href="{{ asset('oneui/custom/bo-admin.css') }}">
    @yield('css')

    <script src="{{ asset('oneui/js/setTheme.js') }}"></script>
    @yield('js')
</head>
<body class="bo-premium-body">
@php($authUser = auth()->user())

<div id="page-container" class="sidebar-o enable-page-overlay sidebar-dark side-scroll page-header-fixed main-content-narrow bo-premium">
    <aside id="side-overlay" class="fs-sm">
        <div class="content-header border-bottom">
            <span class="img-link me-1">
                <img class="img-avatar img-avatar32" src="{{ asset('oneui/media/avatars/avatar10.jpg') }}" alt="Avatar administrateur">
            </span>
            <div class="ms-2">
                <span class="text-dark fw-semibold fs-sm">{{ $authUser?->name ?? 'Administrateur' }}</span>
            </div>
            <a class="ms-auto btn btn-sm btn-alt-danger" href="javascript:void(0)" data-toggle="layout" data-action="side_overlay_close">
                <i class="fa fa-fw fa-times"></i>
            </a>
        </div>
        <div class="content-side">
            <p class="mb-0 text-muted">
                Supervision operationnelle des missions, KYC et paiements.
            </p>
        </div>
    </aside>

    <nav id="sidebar" aria-label="Main Navigation">
        <div class="content-header">
            <a class="font-semibold text-dual" href="{{ route('bo.dashboard') }}">
                <span class="smini-visible">
                    <img src="{{ asset('images/lineup-logo.png') }}" alt="LineUp" style="width: 22px; height: 22px; border-radius: 6px;">
                </span>
                <span class="smini-hide fs-5 tracking-wider d-inline-flex align-items-center gap-2">
                    <img src="{{ asset('images/lineup-logo.png') }}" alt="LineUp" style="width: 24px; height: 24px; border-radius: 7px;">
                    <span>LineUp <span class="fw-normal">France</span></span>
                </span>
            </a>
            <div class="d-flex align-items-center gap-1">
                <div class="dropdown">
                    <button type="button" class="btn btn-sm btn-alt-secondary" id="sidebar-dark-mode-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="far fa-fw fa-moon" data-dark-mode-icon></i>
                    </button>
                    <div class="dropdown-menu dropdown-menu-end smini-hide border-0" aria-labelledby="sidebar-dark-mode-dropdown">
                        <button type="button" class="dropdown-item d-flex align-items-center gap-2" data-toggle="layout" data-action="dark_mode_off" data-dark-mode="off">
                            <i class="far fa-sun fa-fw opacity-50"></i>
                            <span class="fs-sm fw-medium">Clair</span>
                        </button>
                        <button type="button" class="dropdown-item d-flex align-items-center gap-2" data-toggle="layout" data-action="dark_mode_on" data-dark-mode="on">
                            <i class="far fa-moon fa-fw opacity-50"></i>
                            <span class="fs-sm fw-medium">Sombre</span>
                        </button>
                        <button type="button" class="dropdown-item d-flex align-items-center gap-2" data-toggle="layout" data-action="dark_mode_system" data-dark-mode="system">
                            <i class="fa fa-desktop fa-fw opacity-50"></i>
                            <span class="fs-sm fw-medium">Systeme</span>
                        </button>
                    </div>
                </div>
                <a class="d-lg-none btn btn-sm btn-alt-secondary ms-1" data-toggle="layout" data-action="sidebar_close" href="javascript:void(0)">
                    <i class="fa fa-fw fa-times"></i>
                </a>
            </div>
        </div>

        <div class="js-sidebar-scroll">
            <div class="content-side">
                <ul class="nav-main">
                    <li class="nav-main-item">
                        <a class="nav-main-link{{ request()->routeIs('bo.dashboard') ? ' active' : '' }}" href="{{ route('bo.dashboard') }}">
                            <i class="nav-main-link-icon si si-speedometer"></i>
                            <span class="nav-main-link-name">Tableau de bord</span>
                        </a>
                    </li>
                    <li class="nav-main-heading">Gestion</li>
                    <li class="nav-main-item">
                        <a class="nav-main-link{{ request()->routeIs('bo.users.*') ? ' active' : '' }}" href="{{ route('bo.users.index') }}">
                            <i class="nav-main-link-icon si si-users"></i>
                            <span class="nav-main-link-name">Utilisateurs</span>
                        </a>
                    </li>
                    <li class="nav-main-item">
                        <a class="nav-main-link{{ request()->routeIs('bo.missions.*') ? ' active' : '' }}" href="{{ route('bo.missions.index') }}">
                            <i class="nav-main-link-icon si si-briefcase"></i>
                            <span class="nav-main-link-name">Missions</span>
                        </a>
                    </li>
                    <li class="nav-main-item">
                        <a class="nav-main-link{{ request()->routeIs('bo.kyc.*') ? ' active' : '' }}" href="{{ route('bo.kyc.index') }}">
                            <i class="nav-main-link-icon si si-shield"></i>
                            <span class="nav-main-link-name">KYC</span>
                        </a>
                    </li>
                    <li class="nav-main-item">
                        <a class="nav-main-link{{ request()->routeIs('bo.payouts.*') ? ' active' : '' }}" href="{{ route('bo.payouts.index') }}">
                            <i class="nav-main-link-icon si si-wallet"></i>
                            <span class="nav-main-link-name">Retraits</span>
                        </a>
                    </li>
                    <li class="nav-main-heading">Finance</li>
                    <li class="nav-main-item">
                        <a class="nav-main-link{{ request()->routeIs('bo.finance*') ? ' active' : '' }}" href="{{ route('bo.finance') }}">
                            <i class="nav-main-link-icon si si-wallet"></i>
                            <span class="nav-main-link-name">Finance</span>
                        </a>
                    </li>
                    <li class="nav-main-heading">Plateforme</li>
                    <li class="nav-main-item">
                        <a class="nav-main-link" href="{{ url('/') }}" target="_blank" rel="noopener">
                            <i class="nav-main-link-icon si si-globe"></i>
                            <span class="nav-main-link-name">Site public</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <header id="page-header">
        <div class="content-header">
            <div class="d-flex align-items-center">
                <button type="button" class="btn btn-sm btn-alt-secondary me-2 d-lg-none" data-toggle="layout" data-action="sidebar_toggle">
                    <i class="fa fa-fw fa-bars"></i>
                </button>
                <div class="d-none d-md-block">
                    <span class="fs-sm fw-semibold text-muted">Centre de pilotage LineUp</span>
                </div>
            </div>
            <div class="d-flex align-items-center">
                <div class="dropdown d-inline-block ms-2">
                    <button type="button" class="btn btn-sm btn-alt-secondary d-flex align-items-center" id="page-header-user-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <img class="rounded-circle" src="{{ asset('oneui/media/avatars/avatar10.jpg') }}" alt="Avatar administrateur" style="width: 21px;">
                        <span class="d-none d-sm-inline-block ms-2">{{ $authUser?->name ?? 'Administrateur' }}</span>
                        <i class="fa fa-fw fa-angle-down d-none d-sm-inline-block ms-1 mt-1"></i>
                    </button>
                    <div class="dropdown-menu dropdown-menu-md dropdown-menu-end p-0 border-0" aria-labelledby="page-header-user-dropdown">
                        <div class="p-3 text-center bg-body-light border-bottom rounded-top">
                            <img class="img-avatar img-avatar48 img-avatar-thumb" src="{{ asset('oneui/media/avatars/avatar10.jpg') }}" alt="Avatar administrateur">
                            <p class="mt-2 mb-0 fw-medium">{{ $authUser?->name ?? 'Administrateur' }}</p>
                            <p class="mb-0 text-muted fs-sm fw-medium">{{ $authUser?->email ?? 'admin@lineupfrance.com' }}</p>
                        </div>
                        <div class="p-2">
                            <a class="dropdown-item d-flex align-items-center justify-content-between" href="{{ route('bo.dashboard') }}">
                                <span class="fs-sm fw-medium">Tableau de bord</span>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between" href="{{ route('bo.users.index') }}">
                                <span class="fs-sm fw-medium">Utilisateurs</span>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between" href="{{ route('bo.missions.index') }}">
                                <span class="fs-sm fw-medium">Missions</span>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between" href="{{ route('bo.kyc.index') }}">
                                <span class="fs-sm fw-medium">KYC</span>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between" href="{{ route('bo.payouts.index') }}">
                                <span class="fs-sm fw-medium">Retraits</span>
                            </a>
                            <a class="dropdown-item d-flex align-items-center justify-content-between" href="{{ route('bo.finance') }}">
                                <span class="fs-sm fw-medium">Finance</span>
                            </a>
                        </div>
                        <div role="separator" class="dropdown-divider m-0"></div>
                        <div class="p-2">
                            <form method="POST" action="{{ route('bo.logout') }}">
                                @csrf
                                <button type="submit" class="dropdown-item d-flex align-items-center justify-content-between">
                                    <span class="fs-sm fw-medium">Se deconnecter</span>
                                </button>
                            </form>
                        </div>
                    </div>
                </div>
                <button type="button" class="btn btn-sm btn-alt-secondary ms-2" data-toggle="layout" data-action="side_overlay_toggle">
                    <i class="fa fa-fw fa-list-ul fa-flip-horizontal"></i>
                </button>
            </div>
        </div>
    </header>

    <main id="main-container">
        @if (session('status') || $errors->any())
            <div class="content pt-3">
                @if (session('status'))
                    <div class="alert alert-success mb-3">{{ session('status') }}</div>
                @endif
                @if ($errors->any())
                    <div class="alert alert-danger mb-0">{{ $errors->first() }}</div>
                @endif
            </div>
        @endif

        @yield('content')
    </main>

    <footer id="page-footer" class="bg-body-light">
        <div class="content py-3">
            <div class="row fs-sm">
                <div class="col-sm-6 order-sm-2 py-1 text-center text-sm-end">
                    Console Premium LineUp
                </div>
                <div class="col-sm-6 order-sm-1 py-1 text-center text-sm-start">
                    <span class="fw-semibold">Operations, risques et finance</span> &copy; <span data-toggle="year-copy"></span>
                </div>
            </div>
        </div>
    </footer>
</div>

<script src="{{ asset('oneui/build/assets/app-CKg2zGyp.js') }}"></script>
@yield('scripts')
</body>
</html>
