import { AuthServiceService } from './auth-service.service';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class ExternalPageService {
  constructor(private http: HttpClient, 
    private authSer: AuthServiceService) { }

    headerMenus = []; //header data 



  //get header data 
  getHeader(){
    return this.http.get(this.authSer.pathApi + '/main_menu_list/1');
  }

  //get content data 
  getContentData() {
    return this.http.get(this.authSer.pathApi + '/external_page/1');
  }
  
  //get hospital or mangament data 
  getHospitalMangamentsData(typeRequest:string) {
    if(typeRequest == 'hospital') {
      return this.http.get(this.authSer.pathApi + '/hospitals_centers_list/1'); 
    } else if(typeRequest == 'managements') {
      return this.http.get(this.authSer.pathApi + '/managements_list/1');
    }
  }

  //get contact us data 
  getContactUs() {
    return this.http.get(this.authSer.pathApi + '/get_contact_us/1');
  }

  getExternalServices() {
    return this.http.get(this.authSer.pathApi + '/external_services_list_web/1');
  }
  
}
