<header>
    <div class="header-left">
        <img src="<?php echo e(asset('assets/logo/logo.png')); ?>" alt="Logo" style="height: 30px;">
        <!-- <div class="logo-box">
            <i data-lucide="share-2" size="18"></i>
        </div> -->
        <!-- <div class="project-info">
            <h1>MindNode Creator</h1>
            <p>Industrial Pump Logic v2.4</p>
        </div> -->
    </div>
    
    <nav class="header-nav">
        <?php if(auth()->check() && auth()->user()->hasPermission('manage-categories')): ?>
            <a href="<?php echo e(route('admin.categories.manage')); ?>" class="nav-link <?php echo e(request()->routeIs('admin.categories.manage') ? 'active' : ''); ?>">Category Master</a>
        <?php endif; ?>
        
        <?php if(auth()->check() && auth()->user()->hasRole('admin')): ?>
            <a href="<?php echo e(route('admin.templates.create')); ?>" class="nav-link <?php echo e(request()->routeIs('admin.templates.create')||request()->routeIs('admin.root') ? 'active' : ''); ?>">Diagram Viewer</a>
        <?php endif; ?>

        <?php if(auth()->check() && auth()->user()->hasRole('admin')): ?>
            <a href="<?php echo e(route('admin.users')); ?>" class="nav-link <?php echo e(request()->routeIs('admin.users') || request()->routeIs('admin.users.show') ? 'active' : ''); ?>">User Management</a>
            <a href="<?php echo e(route('admin.logs')); ?>" class="nav-link <?php echo e(request()->routeIs('admin.logs') ? 'active' : ''); ?>">Activity Logs</a>
        <?php endif; ?>
        
        <!-- <?php if(auth()->check() && (auth()->user()->hasPermission('manage-roles') || auth()->user()->hasPermission('manage-permission'))): ?>
            <a href="<?php echo e(route('admin.roles')); ?>" class="nav-link <?php echo e(request()->routeIs('admin.roles') ? 'active' : ''); ?>">Role Management</a>
        <?php endif; ?> -->
        <?php if(auth()->check()): ?>
            <a href="<?php echo e(route('admin.templates.index')); ?>" class="nav-link <?php echo e(request()->routeIs('admin.templates.*') ? 'active' : ''); ?>">Templates</a>
        <?php endif; ?>
        <!-- <a href="#" class="nav-link">Settings</a> -->
    </nav>
 <?php if(auth()->check()): ?>
    <div class="header-actions">
        <button class="btn" title="Toggle Sidebar" onclick="toggleLeftPanel()">
            <i data-lucide="panel-left" size="14"></i>
        </button>
        <button class="btn" title="Toggle Properties" onclick="toggleRightPanel()">
            <i data-lucide="panel-right" size="14"></i>
        </button>
        <div style="width:1px; background:var(--border); height:24px; margin:0 8px;"></div>
        
        <?php if(auth()->guard()->check()): ?>
            <a href="<?php echo e(route('admin.profile')); ?>" class="nav-link" style="display:flex; align-items:center; gap:8px; margin-right:12px;">
                <div style="width:28px; height:28px; background:var(--primary-light); color:var(--primary); border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:11px;">
                    <?php echo e(strtoupper(substr(auth()->user()->name, 0, 1))); ?>

                </div>
                <span style="font-weight:600; color:var(--text-main)"><?php echo e(auth()->user()->name); ?></span>
            </a>
            <form action="<?php echo e(route('logout')); ?>" method="POST" style="margin:0;">
                <?php echo csrf_field(); ?>
                <button type="submit" class="btn" style="color:#ef4444; border-color:#fee2e2;">
                    <i data-lucide="log-out" size="14"></i> Logout
                </button>
            </form>
        <?php else: ?>
            <a href="<?php echo e(route('login')); ?>" class="btn">Login</a>
            <a href="<?php echo e(route('register')); ?>" class="btn btn-primary">Get Started</a>
        <?php endif; ?>
    </div>
    <?php endif; ?>
</header>
<?php /**PATH /home/u784977635/domains/git-test.in/public_html/pump-selection/resources/views/layouts/header.blade.php ENDPATH**/ ?>