import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { User } from '../../masters/user/user';
let header = new HttpHeaders();
header = header.set('Content-Type', 'application/json; charset=utf-8');
@Injectable({
  providedIn: 'root'
})
export class NavMenuService {
  baseUrl: string = environment.serviceUrl;
  constructor(private httpClient: HttpClient) { }

  getRoleMappedMenu(userid: number): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/NavMenuApi/getRoleMappedMenu/' + userid);
  }
  getRoleMappedMenuDashboard(userid: number): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/NavMenuApi/getRoleMappedMenuDashboard/' + userid);
  }
}
