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 Visa_applicationservice{
  private baseURL = "Visa_application/Visa_application" ;  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);
  }






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

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

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



















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





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

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

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

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

// updateaction
}