import { Component, OnInit } from '@angular/core';

declare const $: any;
declare interface RouteInfo {
    path: string;
    title: string;
    icon: string;
    class: string;
}
export const ROUTES: RouteInfo[] = [
    { path: '/dashboard', title: 'Escritorio',  icon: 'dashboard', class: '' },
    { path: '/configuration', title: 'Configuración',  icon:'settings', class: '' },
    { path: '/prescription-pending', title: 'Recetas por autorizar',  icon:'healing', class: '' },
    { path: '/orders', title: 'Pedidos',  icon:'attach_money', class: '' },
    { path: '/catalog-category', title: 'Categorias/Familias',  icon:'assignment', class: '' },
    { path: '/catalog-products', title: 'Productos',  icon:'shopping_cart', class: '' },
    { path: '/inventory', title: 'Inventario',  icon:'compare_arrows', class: '' },
    //{ path: '/maps', title: 'Maps',  icon:'location_on', class: '' },
    { path: '/customers', title: 'Clientes',  icon:'people', class: '' },
    { path: '/users', title: 'Usuarios ERP',  icon:'people', class: '' },
    { path: '/users-delivery', title: 'Repartidores',  icon:'people', class: '' },
    { path: '/reports', title: 'Finanzas y reportes',  icon:'list_all', class: '' },
    //{ path: '/upgrade', title: 'Upgrade to PRO',  icon:'unarchive', class: 'active-pro' },
];

@Component({
  selector: 'app-sidebar',
  templateUrl: './sidebar.component.html',
  styleUrls: ['./sidebar.component.css']
})
export class SidebarComponent implements OnInit {
  menuItems: any[];

  constructor() { }

  ngOnInit() {
    this.menuItems = ROUTES.filter(menuItem => menuItem);
  }
  isMobileMenu() {
      if ($(window).width() > 991) {
          return false;
      }
      return true;
  };
}
