import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { Errorremarks_model } from './errorermarks';


@Injectable({
  providedIn: 'root'
})
export class ErrorremarksService {
  baseUrl: string = environment.serviceUrl;

  constructor(private httpClient: HttpClient) { }

  Get_all(): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/ErrorRemarksApi/Getall', {  observe: 'response' });
  }
  Edit_ErrorRemarks(data:Errorremarks_model):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/ErrorRemarksApi/Edit_ErrorRemarks', data,  { observe: 'response' });
  } 
  Active_ErrorRemarks(data:Errorremarks_model):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/ErrorRemarksApi/Active_ErrorRemarks', data,  { observe: 'response' });
  }

  Add_ErrorRemarks(data:Errorremarks_model):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/ErrorRemarksApi/Add_ErrorRemarks', data,  { observe: 'response' });
  }


  GetbyErrorid(data:any): Observable<any> {
    return this.httpClient.post<any>(this.baseUrl + 'api/ErrorRemarksApi/GetbyErrorid',data, {  observe: 'response' });
  }
}
