import { Injectable } from '@angular/core';
import { Observable } from "rxjs";
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
@Injectable({
  providedIn: 'root'
})
export class ProfileService {
    public static updateEmpImage ="Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE";
    constructor(
        public api: ConnectorService,
        public authService: AuthenticationService
      ) {}

      public updateImageProfile( updateImgRequest: any,onError?: any,errorLabel?: string
      ): Observable<any> {
        console.log("services");
        const request = updateImgRequest;
        this.authService.authenticateRequest(request);
        return this.api.post(
            ProfileService.updateEmpImage,
          request,
          onError,
          errorLabel
        );
      }
}