<?php

// Obtém o nome do arquivo atual
$current_file = basename($_SERVER['PHP_SELF']);

// Define a classe 'active' com base no arquivo atual
$dashboard_class = ($current_file != 'index.php') ? 'active open' : '';
$listar_class = ($current_file == 'index.php') ? 'active' : '';
$cadastrar_class = ($current_file == 'garantia_add.php') ? 'active' : '';
$garantia_class = ($dashboard_class == 'active' || $listar_class == 'active' || $cadastrar_class == 'active' ) ? 'active open' : '';

?>

<!-- Menu -->

<aside id="layout-menu" class="layout-menu menu-vertical menu">
    <div class="app-brand demo">
    <a href="index.html" class="app-brand-link">
        <span class="app-brand-logo demo">
        <span class="text-primary">
            <img src="assets/img/ico.png" alt="Logo SYSGAR" class="icon-base" style="width: 30px; height: 30px;">
        </span>
        </span>
        <img src="assets/img/logo.png" alt="Logo SYSGAR" class="app-brand-text demo menu-text fw-bolder ms-2" style="width: 100px; height: 30px;">
    </a>

    <a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto">
        <i class="icon-base ti menu-toggle-icon d-none d-xl-block"></i>
        <i class="icon-base ti tabler-x d-block d-xl-none"></i>
    </a>
    </div>

    <div class="menu-inner-shadow"></div>

    <ul class="menu-inner py-1">

    <!-- DASHBOARDS -->
    <li class="menu-header small">
        <span class="menu-header-text" data-i18n="DASHBOARDS">DASHBOARDS</span>
    </li>

    <li class="menu-item">
        <a href="javascript:void(0);" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-smart-home"></i>
        <div data-i18n="Painéis">Painéis</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item">
            <a href="index.php?page=dashboard" class="menu-link">
            <div data-i18n="Geral">Geral</div>
            </a>
        </li>
        <li class="menu-item">
            <a href="#" class="menu-link">
            <div data-i18n="Gestor">Gestor</div>
            </a>
        </li>
        </ul>
    </li>

    <!-- APLICAÇÃO -->
    <li class="menu-header small">
        <span class="menu-header-text" data-i18n="APLICAÇÃO">APLICAÇÃO</span>
    </li>
    <!-- <li class="menu-item active open"> -->
    <li class="menu-item">
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-brand-line"></i>
        <div data-i18n="OS">OS</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item active"><a href="index.php?page=chamados" class="menu-link"><div data-i18n="Atendimentos">Atendimentos</div></a></li>
        <li class="menu-item"><a href="index.php?page=chamadosAdd" class="menu-link"><div data-i18n="Abrir Chamado">Abrir Chamado</div></a></li>
        </ul>
    </li>
    <!-- <li class="menu-item active open"> -->
    <li class="menu-item">
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-edit"></i>
        <div data-i18n="Cadastros">Cadastros</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item"><a href="index.php?page=produtos" class="menu-link"><div data-i18n="Produtos">Produtos</div></a></li>
        <li class="menu-item"><a href="index.php?page=eqp_tipos" class="menu-link"><div data-i18n="Tipos">Tipos</div></a></li>
        <li class="menu-item"><a href="index.php?page=ncm" class="menu-link"><div data-i18n="NCM">NCM</div></a></li>
        <li class="menu-item"><a href="index.php?page=eqp_fabricantes" class="menu-link"><div data-i18n="Fabricantes">Fabricantes</div></a></li>
        <li class="menu-item"><a href="index.php?page=eqp_modelos" class="menu-link"><div data-i18n="Modelos">Modelos</div></a></li>
        <li class="menu-item"><a href="index.php?page=eqp_tamanho" class="menu-link"><div data-i18n="Tamanhos">Tamanhos</div></a></li>
        <li class="menu-item"><a href="index.php?page=area" class="menu-link"><div data-i18n="Área">Área</div></a></li>
        </ul>
    </li>
    <li class="menu-item">        
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-users-group"></i>
        <div data-i18n="Participantes">Participantes</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item"><a href="index.php?page=clientes" class="menu-link"><div data-i18n="Clientes">Clientes</div></a></li>
        <li class="menu-item"><a href="index.php?page=fornecedores" class="menu-link"><div data-i18n="Fornecedores">Fornecedores</div></a></li>
        </ul>
    </li>
    <li class="menu-item">        
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-stack-3"></i>
        <div data-i18n="Estoque">Estoque</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item active"><a href="index.php?page=produtos" class="menu-link"><div data-i18n="Produtos">Produtos</div></a></li>
        <li class="menu-item"><a href="index.php?page=saidas" class="menu-link"><div data-i18n="Saídas">Saídas</div></a></li>
        </ul>
    </li>
    <li class="menu-item">        
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-phone-done"></i>
        <div data-i18n="Serviços">Serviços</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item"><a href="index.php?page=servicos" class="menu-link"><div data-i18n="Serviços">Serviços</div></a></li>
        <li class="menu-item"><a href="index.php?page=especialistas" class="menu-link"><div data-i18n="Especialistas">Especialistas</div></a></li>
        <li class="menu-item"><a href="index.php?page=tipos" class="menu-link"><div data-i18n="Tipos de Serviços">Tipos de Serviços</div></a></li>
        <li class="menu-item"><a href="index.php?page=sla" class="menu-link"><div data-i18n="SLA">SLA</div></a></li>
        <li class="menu-item"><a href="index.php?page=solucao" class="menu-link"><div data-i18n="Solução">Solução</div></a></li>
        <li class="menu-item"><a href="index.php?page=status" class="menu-link"><div data-i18n="Status">Status</div></a></li>
        </ul>
    </li>
    <li class="menu-item">        
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-id"></i>
        <div data-i18n="Contratos">Contratos</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item"><a href="index.php?page=contrato" class="menu-link"><div data-i18n="Contratos X Clientes">Contratos X Clientes</div></a></li>
        <li class="menu-item"><a href="index.php?page=contrato_maquina" class="menu-link"><div data-i18n="Máquinas x Contratos">Máquinas x Contratos</div></a></li>
        <li class="menu-item"><a href="index.php?page=contratos_tipo" class="menu-link"><div data-i18n="Tipos">Tipos</div></a></li>
        <li class="menu-item"><a href="index.php?page=contrato_maquina_leituras" class="menu-link"><div data-i18n="Leituras">Leituras</div></a></li>
        </ul>
    </li>


    <!-- Relatórios -->
    <li class="menu-header small">
        <span class="menu-header-text" data-i18n="Relatórios">Relatórios</span>
    </li>
    <li class="menu-item">
        <a href="javascript:void(0);" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-files"></i>
        <div data-i18n="Atendimentos">Atendimentos</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item">
            <a href="index.php?page=chamadosReport" class="menu-link">
            <div data-i18n="Chamados">Chamados</div>
            </a>
        </li>
        </ul>
    </li>


    <!-- CONFIGURAÇÕES -->
    <li class="menu-header small">
        <span class="menu-header-text" data-i18n="CONFIGURAÇÕES">CONFIGURAÇÕES</span>
    </li>
    <li class="menu-item">
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-user"></i>
        <div data-i18n="Usuários">Usuários</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item">
            <a href="index.php?page=usuarios" class="menu-link">
            <div data-i18n="Gerenciar">Gerenciar</div>
            </a>
        </li>
        </ul>
    </li>
    <li class="menu-item">
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-id"></i>
        <div data-i18n="Fornecedores">Fornecedores</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item">
            <a href="index.php?page=fornecedores" class="menu-link">
            <div data-i18n="Gerenciar">Gerenciar</div>
            </a>
        </li>
        </ul>
    </li>
    <li class="menu-item">
        <a href="#" class="menu-link menu-toggle">
        <i class="menu-icon icon-base ti tabler-users"></i>
        <div data-i18n="Clientes">Clientes</div>
        </a>
        <ul class="menu-sub">
        <li class="menu-item">
            <a href="index.php?page=clientes" class="menu-link">
            <div data-i18n="Gerenciar">Gerenciar</div>
            </a>
        </li>
        </ul>
    </li>

    

    <!-- AJUDA -->
    <li class="menu-header small">
        <span class="menu-header-text" data-i18n="AJUDA">AJUDA</span>
    </li>
    <li class="menu-item">
        <a href="https://wa.me/5585991994652" class="menu-link" target="_blank">
            <i class="menu-icon icon-base ti tabler-messages"></i>
            <div data-i18n="Suporte">Suporte</div>
        </a>
    </li>
    </ul>
</aside>

<div class="menu-mobile-toggler d-xl-none rounded-1">
    <a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large text-bg-secondary p-2 rounded-1">
    <i class="ti tabler-menu icon-base"></i>
    <i class="ti tabler-chevron-right icon-base"></i>
    </a>
</div>
<!-- / Menu -->