<!doctype html>
<html lang="bn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $__env->yieldContent('title', 'Dashboard'); ?></title>
    <link rel="stylesheet" href="<?php echo e(asset('admin/css/app.css')); ?>">
</head>
<body>
<div class="layout" id="layout">
    <?php echo $__env->make('admin.partials.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <main class="main" id="main">
        <?php echo $__env->make('admin.partials.topbar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

        <div class="page">
            <?php if(session('success')): ?>
                <div class="alert alert-success"><?php echo e(session('success')); ?></div>
            <?php endif; ?>

            <?php if(session('error')): ?>
                <div class="alert alert-danger"><?php echo e(session('error')); ?></div>
            <?php endif; ?>

            <?php if($errors->any()): ?>
                <div class="alert alert-danger">
                    <strong>Validation error:</strong>
                    <ul style="margin:8px 0 0 18px; padding:0;">
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>

            <?php echo $__env->yieldContent('content'); ?>
        </div>
    </main>
</div>
<div class="sidebar-backdrop" id="sidebarBackdrop"></div>

<script>
(function () {
    var burger = document.getElementById('burger');
    var sidebar = document.getElementById('sidebar');
    var main = document.getElementById('main');
    var layout = document.getElementById('layout');
    var sidebarBackdrop = document.getElementById('sidebarBackdrop');
    var dropdownToggles = document.querySelectorAll('.menu-toggle');

    function closeSidebar() {
        if (!sidebar || !main) return;
        sidebar.classList.remove('open');
        main.classList.remove('push');
        document.body.classList.remove('sidebar-open');
    }

    function toggleSidebar() {
        if (!sidebar || !main) return;
        sidebar.classList.toggle('open');
        main.classList.toggle('push');
        document.body.classList.toggle('sidebar-open');
    }

    if (burger && sidebar && main) {
        burger.addEventListener('click', function () {
            toggleSidebar();
        });
    }

    if (sidebarBackdrop) {
        sidebarBackdrop.addEventListener('click', closeSidebar);
    }

    dropdownToggles.forEach(function (toggle) {
        toggle.addEventListener('click', function () {
            var targetId = this.getAttribute('data-target');
            var target = document.getElementById(targetId);

            if (target) {
                this.classList.toggle('open');
                target.classList.toggle('open');
            }
        });
    });

    document.addEventListener('click', function (e) {
        if (window.innerWidth <= 980 && sidebar && burger) {
            var clickedInsideSidebar = sidebar.contains(e.target);
            var clickedBurger = burger.contains(e.target);

            if (!clickedInsideSidebar && !clickedBurger && sidebar.classList.contains('open')) {
                closeSidebar();
            }
        }
    });

    window.addEventListener('resize', function () {
        if (window.innerWidth > 980) {
            document.body.classList.remove('sidebar-open');
            main && main.classList.remove('push');
        }
    });
})();
</script>
</body>
</html>
<?php /**PATH /home/emdadtwa/erp.sef.it.com/resources/views/admin/layouts/app.blade.php ENDPATH**/ ?>