@php

$dashboard = ['home'];
$reports = ['appointments'];
$admin = ['users','indicatorCategories','companies','units','indicators'];
$reports = [];
$routeName = Route::current()->getName();

@endphp
<div class="sidebar-menu">
    <ul class="menu">
        <li class="sidebar-title">Menu</li>

        <li class="sidebar-item {{ in_array($routeName,$dashboard) ? 'active' : '' }} ">
            <a href="{{ route('home') }}" class='sidebar-link active'>
                <i class="bi bi-grid-fill"></i>
                <span>Dashboard</span>
            </a>
        </li>

        <li class="sidebar-item {{ in_array($routeName,['addIndicatorEntries']) ? 'active' : '' }} ">
            <a href="{{ route('addIndicatorEntries') }}" class="sidebar-link {{ $routeName == 'addIndicatorEntries' ? 'active' : '' }}">
                <i class="bi bi-grid-fill"></i>
                <span>Agregar entrada indicadores</span>
            </a>
        </li>

        <!-- <li class="sidebar-item has-sub  {{ in_array($routeName,$reports) ? 'active' : '' }} ">
            <a href="#" class='sidebar-link'>
                <i class="bi bi-grid-1x2-fill"></i>
                <span>Reports</span>
            </a>
            <ul class="submenu {{ in_array($routeName,$reports) ? 'active' : '' }} ">
                <li class="submenu-item {{ $routeName == 'users' ? 'active' : '' }} ">
                    <a href="">Report 1</a>
                </li>
                <li class="submenu-item {{ $routeName == 'users' ? 'active' : '' }} ">
                    <a href="">Report 2</a>
                </li>
                <li class="submenu-item {{ $routeName == 'users' ? 'active' : '' }} ">
                    <a href="">Report 3</a>
                </li>
            </ul>
        </li> -->

        <li class="sidebar-item has-sub  {{ in_array($routeName,$admin) ? 'active' : '' }} ">
            <a href="#" class='sidebar-link'>
                <i class="bi bi-grid-1x2-fill"></i>
                <span>Admin</span>
            </a>
            <ul class="submenu {{ in_array($routeName,$admin) ? 'active' : '' }} ">
                <li class="submenu-item {{ $routeName == 'companies' ? 'active' : '' }} ">
                    <a href="{{ route('companies') }}">Companies</a>
                </li>
                <li class="submenu-item {{ $routeName == 'users' ? 'active' : '' }} ">
                    <a href="{{ route('users') }}">Users</a>
                </li>
                <li class="submenu-item {{ $routeName == 'units' ? 'active' : '' }} ">
                    <a href="{{ route('units') }}">Units</a>
                </li>
                <li class="submenu-item {{ $routeName == 'indicatorCategories' ? 'active' : '' }} ">
                    <a href="{{ route('indicatorCategories') }}">Indicators Categories</a>
                </li>
                <li class="submenu-item {{ $routeName == 'indicators' ? 'active' : '' }} ">
                    <a href="{{ route('indicators') }}">Indicators</a>
                </li>

            </ul>
        </li>

    </ul>
</div>