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

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

  constructor(private httpClient: HttpClient) { }

  
  Get_all(): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/LobDetailsApi/Getall', {  observe: 'response' });
  }
  Edit_Lobdetails(data:Lobdetails_model):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/LobDetailsApi/Edit_LobDetails', data,  { observe: 'response' });
  } 
  Active_Lobdetails(data:Lobdetails_model):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/LobDetailsApi/Active_LobDetails', data,  { observe: 'response' });
  }

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

  // Get_Lobdetailslst(lotid:number,jobid:number,tranid:number): Observable<any> {
  //   return this.httpClient.get<any>(this.baseUrl + 'api/LobdetailsApi/Get_Lobdetailslst?jobid=' + jobid+'&lotid='
  //   + lotid+'&tranid=' +tranid, {  observe: 'response' });
  // } 
   Get_Lobdetailslst(data:any): Observable<any> {
    return this.httpClient.post<any>(this.baseUrl + 'api/LobDetailsApi/Get_LobDetailslst',data, {  observe: 'response' });
  }
}
