import { Injectable } from '@angular/core';
import { Observable } from "rxjs";
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
import { ApiRequestService } from "src/app/services/api/api-request.service";
import { environment } from 'src/environments/environment';
@Injectable({
  providedIn: 'root'
})
export class Customer_informationservice{
  private baseURL = "Customer_information/Customer_information" ;  constructor(
    private http: HttpClient,
    private apiRequest: ApiRequestService,
  ) { }
  getAll(page?: number, size?: number): Observable<any> {
    return this.apiRequest.get(this.baseURL);
  }
  getById(id: number): Observable<any> {
    const _http = this.baseURL + "/" + id;
    return this.apiRequest.get(_http);
  }
  create(data: any): Observable<any> {
    return this.apiRequest.post(this.baseURL, data);
  }
  update(id: number, data: any): Observable<any> {
    const _http = this.baseURL + "/" + id;
    return this.apiRequest.put(_http, data);
  }
  delete(id: number): Observable<any> {
    const _http = this.baseURL + "/" + id;
    return this.apiRequest.delete(_http);
  }




getAllmanufacturer(): Observable<any> {   
return this.apiRequest.get("Manufacturer_ListFilter1/Manufacturer_ListFilter1");  }



  gettypeDependent(field: string): Observable<any> {
    return this.apiRequest.get("Types_ListFilter1/Types_ListFilter11/" + field);
  }





  getproductDependent(field: string): Observable<any> {
    return this.apiRequest.get("Product_ListFilter1/Product_ListFilter11/" + field);
  }









getAlldeployment_type(): Observable<any> {   
return this.apiRequest.get("Deployment_type_ListFilter1/Deployment_type_ListFilter1");  }









// updateaction
}