
<aside 
    :class="{ 'w-64': !collapsed, 'w-16': collapsed }"
    class="bg-gray-800 text-white min-h-screen fixed top-0 left-0 transition-all duration-300 z-30">

    <div class="p-4 flex items-center justify-between">
        <span class="text-xl font-bold" x-show="!collapsed">
            <?php if(Auth::user()->role === 'super admin'): ?>
                Super Admin
            <?php elseif(Auth::user()->role === 'admin'): ?>
                Admin
            <?php else: ?>
                User
            <?php endif; ?>
        </span>

        <button @click="collapsed = !collapsed" class="text-white focus:outline-none">
            <i class="fas fa-bars"></i>
        </button>
    </div>
    <nav class="mt-4 space-y-1">
        <a href="<?php echo e(route('dashboard')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700">
            <i class="fas fa-home"></i>
            <span class="ml-3" x-show="!collapsed">Dashboard</span>
        </a>
        <?php if (\Illuminate\Support\Facades\Blade::check('role', 'super-admin')): ?>
            <!-- Admin List -->
            <a href="<?php echo e(route('super.admin')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700">
                <i class="fas fa-user-shield"></i>
                <span class="ml-3" x-show="!collapsed">Admin</span>
            </a>
            <!-- User List -->
            <a href="<?php echo e(route('super.user')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700">
                <i class="fas fa-users"></i>
                <span class="ml-3" x-show="!collapsed">User</span>
            </a>
        <?php endif; ?>
        <?php if (\Illuminate\Support\Facades\Blade::check('role', 'admin')): ?>
            <!-- Properties -->
            <a href="<?php echo e(route('properties.index')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700 text-white">
                <i class="fas fa-building"></i>
                <span class="ml-3" x-show="!collapsed">Properties</span>
            </a>
            <!-- Admin -->
            <a href="<?php echo e(route('manage.admin')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700 text-white">
                <i class="fas fa-user-shield"></i>
                <span class="ml-3" x-show="!collapsed">Admin</span>
            </a>

            <!-- Contact Us -->
            <a href="<?php echo e(route('contact.Lead')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700 text-white">
                <i class="fas fa-envelope"></i>
                <span class="ml-3" x-show="!collapsed">Leads</span>
            </a>

        <?php endif; ?>
        <?php if (\Illuminate\Support\Facades\Blade::check('role', 'user')): ?>
            <!-- Properties -->
            <a href="<?php echo e(route('properties.all')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700 text-white">
                <i class="fas fa-building"></i>
                <span class="ml-3" x-show="!collapsed">Properties</span>
            </a>
            
            <!-- Contact Us -->
            <a href="<?php echo e(route('contact.Lead')); ?>" class="flex items-center px-4 py-2 hover:bg-gray-700 text-white">
                <i class="fas fa-envelope"></i>
                <span class="ml-3" x-show="!collapsed">Leads</span>
            </a>
        <?php endif; ?>
    </nav>
</aside>
<?php /**PATH E:\Arif_Website\realState\resources\views/layouts/partials/sidebar.blade.php ENDPATH**/ ?>