<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $__env->yieldContent('title', 'Admin'); ?> | <?php echo e($siteName ?? 'Accessway Express'); ?></title>
    <?php if(!empty($faviconUrl)): ?><link rel="icon" href="<?php echo e($faviconUrl); ?>"><?php endif; ?>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo e(asset('css/app.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/admin.css')); ?>">
</head>
<body class="admin">
    <header class="admin-topbar">
        <div class="admin-topbar-left">
            <button class="hamburger" type="button" data-toggle-side aria-label="Toggle menu">☰</button>
            <strong><?php echo e($siteName ?? 'Accessway Express Courier'); ?></strong>
        </div>
        <div class="admin-user">
            <span class="profile-ico" aria-hidden="true">👤</span>
            <span><?php echo e(trim((auth()->user()->first_name ?? '').' '.(auth()->user()->last_name ?? '')) ?: auth()->user()->name); ?></span>
            <form method="POST" action="<?php echo e(route('admin.logout')); ?>">
                <?php echo csrf_field(); ?>
                <button type="submit">Log out</button>
            </form>
        </div>
    </header>

    <div class="admin-shell">
        <aside class="admin-side">
            <div class="side-head">
                <small>Admin Manager</small>
                <b>Admin</b>
            </div>
            <a href="<?php echo e(route('admin.shipments.index')); ?>" class="<?php echo e(request()->routeIs('admin.dashboard') || request()->routeIs('admin.shipments.index') || request()->routeIs('admin.shipments.show') ? 'active' : ''); ?>">
                <span class="ico">⌂</span> Dashboard
            </a>
            <a href="<?php echo e(route('admin.shipments.create')); ?>" class="<?php echo e(request()->routeIs('admin.shipments.create') ? 'active' : ''); ?>">
                <span class="ico">🚚</span> Create New Shipment
            </a>
            <div class="side-group <?php echo e(request()->routeIs('admin.email.*') || request()->routeIs('admin.messages.*') ? 'open' : ''); ?>">
                <button type="button" class="side-toggle <?php echo e(request()->routeIs('admin.email.*') || request()->routeIs('admin.messages.*') ? 'active' : ''); ?>">
                    <span><span class="ico">✉</span> Email Services</span>
                    <span>▾</span>
                </button>
                <div class="side-sub">
                    <a href="<?php echo e(route('admin.email.create')); ?>" class="<?php echo e(request()->routeIs('admin.email.*') ? 'active' : ''); ?>">Send Email</a>
                    <a href="<?php echo e(route('admin.messages.index')); ?>" class="<?php echo e(request()->routeIs('admin.messages.*') ? 'active' : ''); ?>">Inbox</a>
                </div>
            </div>
            <a href="<?php echo e(route('admin.administrators.index')); ?>" class="<?php echo e(request()->routeIs('admin.administrators.*') ? 'active' : ''); ?>">
                <span class="ico">👤</span> Administrator(s)
            </a>
            <div class="side-group <?php echo e(request()->routeIs('admin.settings.*') ? 'open' : ''); ?>">
                <button type="button" class="side-toggle <?php echo e(request()->routeIs('admin.settings.*') ? 'active' : ''); ?>">
                    <span><span class="ico">⚙</span> Settings</span>
                    <span>▾</span>
                </button>
                <div class="side-sub">
                    <a href="<?php echo e(route('admin.settings.index')); ?>" class="<?php echo e(request()->routeIs('admin.settings.*') ? 'active' : ''); ?>">App Settings</a>
                </div>
            </div>
            <a href="<?php echo e(route('home')); ?>" target="_blank">
                <span class="ico">i</span> View website
            </a>
        </aside>

        <div class="admin-main">
            <div class="admin-page-head">
                <h1><?php echo $__env->yieldContent('heading', 'Dashboard'); ?></h1>
                <div class="page-actions">
                    <?php echo $__env->yieldContent('actions'); ?>
                </div>
            </div>
            <?php if(session('success')): ?>
                <div class="alert alert-ok"><?php echo e(session('success')); ?></div>
            <?php endif; ?>
            <?php if($errors->any()): ?>
                <div class="alert alert-err"><?php echo e($errors->first()); ?></div>
            <?php endif; ?>
            <?php echo $__env->yieldContent('content'); ?>
        </div>
    </div>
    <script>
        document.querySelector('[data-toggle-side]')?.addEventListener('click', function () {
            document.body.classList.toggle('side-collapsed');
        });
        document.querySelectorAll('.side-toggle').forEach(function (btn) {
            btn.addEventListener('click', function () {
                btn.parentElement.classList.toggle('open');
            });
        });
    </script>
    <?php echo $__env->yieldContent('scripts'); ?>
</body>
</html>
<?php /**PATH C:\Users\owner\Videos\NEWCOURIER\resources\views/layouts/admin.blade.php ENDPATH**/ ?>