<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-navy">
    <!-- Brand Logo -->
    <a href="<?=base_url()?>/application" class="brand-link bg-primary">
        <img src="<?=base_url()?>/dist/img/logo-grafix-w.png"
             alt="Calculador"
             class="brand-image">
        <span class="brand-text font-weight-bold text-light">Calculador</span>
    </a>
    <!-- Sidebar -->
    <div class="sidebar">
        <!-- Sidebar user (optional) -->
        <!--<div class="user-panel mt-3 pb-3 mb-3 d-flex">
            <div class="image">
                <img src="
                <?php if (session()->get('profile_picture') !='' || session()->get('profile_picture') !=null):?>
                     <?=base_url()?>/<?= session()->get('profile_picture')?>
                <?php else: ?>
                 <?=base_url()?>/uploads/default/profiles/profile.png
                <?php endif; ?>
                "
                     class="img-circle elevation-2" alt="User Image">
            </div>
            <div class="info">
                <a href="#" class="d-block"><?= session()->get('username')?></a>
            </div>
        </div>-->

        <!-- Sidebar Menu -->
        <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
                <!-- Add icons to the links using the .nav-icon class
                     with font-awesome or any other icon font library -->
                <li class="nav-item">
                    <a href="<?=base_url()?>/application" class="nav-link">
                        <i class="fas fa-tachometer-alt nav-icon"></i>
                        <p>Panell de Control</p>
                    </a>
                </li>
                <li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fas fa-sitemap"></i>
                        <p>
                            Calculador
                            <i class="fas fa-angle-left right"></i>
                        </p>
                    </a>
                    <ul class="nav nav-treeview">
                        <li class="nav-item">
                            <a href="<?=base_url()?>/seccions" class="nav-link">
                                <i class="far fa-circle nav-icon"></i>
                                <p>Seccions</p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="far fa-circle nav-icon"></i>
                                <p>Configuració</p>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="nav-item">
                    <a href="<?= base_url()?>/pressupostos" class="nav-link">
                    <i class="nav-icon fas fa-list"></i>
                        <p>Pressupostos</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="<?= base_url()?>/clients" class="nav-link">
                    <i class="nav-icon fas fa-user-shield"></i>
                        <p>Clients</p>
                    </a>
                </li>
                <?php if(session('empresa_id_user') == 1): ?>
                <li class="nav-item">
                    <a href="<?= base_url()?>/empreses" class="nav-link">
                    <i class="nav-icon fas fa-briefcase"></i>
                        <p>Empreses</p>
                    </a>
                </li>
                <?php endif; ?>
                <li class="nav-item">
                    <a href="<?= base_url()?>/users" class="nav-link">
                    <i class="nav-icon fas fa-users"></i>
                        <p>Usuaris</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="<?= base_url() ?>/configuracio" class="nav-link">
                        <i class="nav-icon fas fa-cog"></i>
                        <p>Configuració</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="<?= base_url() ?>" class="nav-link" target="_blank">
                        <i class="nav-icon fas fa-external-link-alt"></i>
                        <p>Frontend</p>
                    </a>
                </li>
                <!--<li class="nav-item has-treeview">
                    <a href="#" class="nav-link">
                        <i class="nav-icon fas fa-cogs"></i>
                        <p>
                            System Setup
                            <i class="fas fa-angle-left right"></i>
                        </p>
                    </a>
                    <ul class="nav nav-treeview">
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="far fa-circle nav-icon"></i>
                                <p>General Master</p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="#" class="nav-link">
                                <i class="far fa-circle nav-icon"></i>
                                <p>Company Setup </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="<?= base_url()?>/users" class="nav-link">
                                <i class="far fa-circle nav-icon"></i>
                                <p>User Management</p>
                            </a>
                        </li>
                    </ul>
                </li>-->
            </ul>
        </nav>
        <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
</aside>