import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ContractRoom } from 'src/app/core/models/hotelService/AddRoom/Room.model';
import { environment } from 'src/environments/environment';
// import { CommonFunctions } from 'src/app/core/common/common-functions';
// import { environment } from 'src/environments/environment';




@Injectable({
    providedIn: 'root'
})

export class AddRoomService {
    SaveRoom(dataPost: ContractRoom) {
        throw new Error('Method not implemented.');
    }
    constructor(private http: HttpClient) { }
    getAllRoomCategory() {
        return this.http.get(environment.APIBaseUrl + "/RoomCategoryName/GetAllRoomCategory")
    };
    GetAllHotelAmenity() {
        return this.http.get(environment.APIBaseUrl + "/HotelAmenity/GetAllHotelAmenity")
    };
    GetAllRoomViewName() {
        return this.http.get(environment.APIBaseUrl + "/RoomViewName/GetAllRoomViewName")
    };
    GetAllRoomBedType() {
        return this.http.get(environment.APIBaseUrl + "/BedTypeMaster/GetAllBedType")
    };
    SaveRoomContract(roomDetails) {
        return this.http.post(environment.APIBaseUrl + "/RoomContract/SaveContractRoom", roomDetails)
    };
    UpdateRoomContract(roomDetails) {
        return this.http.post(environment.APIBaseUrl + "/RoomContract/UpdateContractRoom", roomDetails)
    };
    saveImage(file) {
        return this.http.post(environment.APIBaseUrl + "/FileUpload/SaveFile", file)
    };
    getlovtype() {
        let formdata = {
            "lov_types": [{ "lov_type": "MeasureUnit" }],
            "lov_lang": "en"
        }
        return this.http.post(environment.APIBaseUrl + "/LovMaster/GetLov", formdata)
    };
    GetRoomContractById(Id) {
        return this.http.get(environment.APIBaseUrl + "/RoomContract/GetContractRoom/" + Id)
    };
    


}