<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <title><?php echo $__env->yieldContent("title", "Dashboard"); ?> — <?php echo e(setting("site_name", config("app.name"))); ?></title>
    <?php if($fav = site_favicon()): ?><link rel="icon" href="<?php echo e($fav); ?>"><link rel="shortcut icon" href="<?php echo e($fav); ?>"><?php endif; ?>
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Lora:wght@400;500;700&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo e(asset('css/app.css')); ?>" rel="stylesheet">
    <?php echo $__env->yieldPushContent('head'); ?>
</head>
<body>
<div class="dash-wrapper">
    <?php echo $__env->make('partials.sidebar-' . auth()->user()->role, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <div class="dash-main">
        <div class="dash-topbar">
            <div class="d-flex align-items-center">
                <button id="sidebarToggle" class="btn btn-sm d-lg-none me-2" style="background: var(--accent); color: var(--primary);">☰</button>
                <h1 class="dash-topbar-title"><?php echo $__env->yieldContent('page-title', 'Dashboard'); ?></h1>
            </div>
            <div class="user-menu">
                <span class="user-role-badge role-<?php echo e(auth()->user()->role); ?>"><?php echo e(auth()->user()->role); ?></span>
                <a href="<?php echo e(route('profile.edit')); ?>" class="text-decoration-none d-flex align-items-center gap-2">
                    <img src="<?php echo e(auth()->user()->avatarUrl()); ?>" alt="avatar" class="user-avatar-sm">
                    <span class="d-none d-md-inline"><?php echo e(auth()->user()->name); ?></span>
                </a>
                <form method="POST" action="<?php echo e(route('logout')); ?>" class="d-inline">
                    <?php echo csrf_field(); ?>
                    <button class="btn btn-sm btn-outline-danger">Logout</button>
                </form>
            </div>
        </div>

        <div class="dash-content">
            <?php if(session('success')): ?><div class="alert alert-success alert-auto-dismiss"><?php echo e(session('success')); ?></div><?php endif; ?>
            <?php if(session('error')): ?><div class="alert alert-danger alert-auto-dismiss"><?php echo e(session('error')); ?></div><?php endif; ?>
            <?php if(session('info')): ?><div class="alert alert-info alert-auto-dismiss"><?php echo e(session('info')); ?></div><?php endif; ?>
            <?php if(session('warning')): ?><div class="alert alert-warning alert-auto-dismiss"><?php echo e(session('warning')); ?></div><?php endif; ?>
            <?php if($errors->any()): ?>
                <div class="alert alert-danger"><ul class="mb-0"><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $err): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($err); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></ul></div>
            <?php endif; ?>
            <?php echo $__env->yieldContent('content'); ?>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="<?php echo e(asset('js/app.js')); ?>"></script>
<?php echo $__env->yieldPushContent('scripts'); ?>
</body>
</html>
<?php /**PATH C:\xampp82\htdocs\blog\resources\views/layouts/dashboard.blade.php ENDPATH**/ ?>