<aside class="sidebar">
    <button type="button" class="sidebar-close-btn !mt-4">
        <iconify-icon icon="radix-icons:cross-2"></iconify-icon>
    </button>
    <div>
        <a href="{{ route('index') }}" class="sidebar-logo">
            <img src="{{ asset('assets/images/logo.png') }}" alt="site logo" class="light-logo">
            <img src="{{ asset('assets/images/logo-light.png') }}" alt="site logo" class="dark-logo">
            <img src="{{ asset('assets/images/logo-icon.png') }}" alt="site logo" class="logo-icon">
        </a>
    </div>
    <div class="sidebar-menu-area">
        <ul class="sidebar-menu" id="sidebar-menu">

            {{-- 1. DASHBOARD (Admin & Petugas) --}}
            <li>
                <a href="{{ route('index') }}">
                    <iconify-icon icon="solar:home-smile-angle-outline" class="menu-icon"></iconify-icon>
                    <span>Dashboard</span>
                </a>
            </li>
            @if(Auth::user()->role === 'petugas')
            <li>
                <a href="{{ route('DataPetugas.pemasangan') }}">
                    <iconify-icon icon="mdi:water-pump" class="menu-icon"></iconify-icon>
                    <span>Pemasangan</span>
                </a>
            </li>
            @endif

            {{-- 2. VERIFIKASI (Hanya Admin) --}}
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('verifikasi') }}">
                    <iconify-icon icon="iconamoon:check-circle-1-light" class="menu-icon"></iconify-icon>
                    <span>Verifikasi</span>
                </a>
            </li>
            @endif

            {{-- 3. DATA PELANGGAN (Hanya Admin) --}}
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('DataPelanggan') }}">
                    <iconify-icon icon="solar:user-linear" class="menu-icon"></iconify-icon>
                    <span>Data Pelanggan</span>
                </a>
            </li>
            @endif

            {{-- 4. DATA PETUGAS (Hanya Admin) --}}
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('DataPetugas') }}">
                    <iconify-icon icon="healthicons:surveilance-officer-outline" class="menu-icon"></iconify-icon>
                    <span>Data Petugas</span>
                </a>
            </li>
            @endif
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('DataPetugas.stok') }}">
                    <iconify-icon icon="mdi:gauge" class="menu-icon"></iconify-icon>
                    <span>Stok Meteran</span>
                </a>
            </li>
            @endif
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('monitoring.pemasangan') }}">
                    <iconify-icon icon="mdi:monitor-dashboard" class="menu-icon"></iconify-icon>
                    <span>Monitoring Pemasangan</span>
                </a>
            </li>
            @endif

            {{-- 5. PENCATATAN (Admin & Petugas) --}}
            <li>
                <a href="{{ route('pencatatan.index') }}">
                    <iconify-icon icon="carbon:meter-alt" class="menu-icon"></iconify-icon>
                    <span>Pencatatan</span>
                </a>
            </li>

            {{-- 6. TAGIHAN (Admin & Petugas) --}}
            <li>
                <a href="{{ route('tagihan.index') }}">
                    <iconify-icon icon="solar:bill-list-linear" class="menu-icon"></iconify-icon>
                    <span>Tagihan</span>
                </a>
            </li>

            {{-- 7. BERITA (Admin & Petugas) --}}
            <li>
                <a href="{{ route('news.index') }}">
                    <iconify-icon icon="hugeicons:news" class="menu-icon"></iconify-icon>
                    <span>Berita</span>
                </a>
            </li>

            {{-- 8. NOTIFIKASI (Hanya Admin) --}}
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('notifikasi.index') }}">
                    <iconify-icon icon="ri:whatsapp-line" class="menu-icon"></iconify-icon>
                    <span>Notifikasi</span>
                </a>
            </li>
            @endif

            {{-- 9. LAPORAN (Hanya Admin) --}}
            @if(Auth::user()->role === 'admin')
            <li>
                <a href="{{ route('laporan.index') }}">
                    <iconify-icon icon="icon-park-outline:table-report" class="menu-icon"></iconify-icon>
                    <span>Laporan</span>
                </a>
            </li>
            @endif

        </ul>
    </div>
</aside>