import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { SearchRoomModel } from '../models/searchroom.model';
import { SearchEqModel } from '../models/searcheq.model';

@Injectable({ providedIn: 'root'})
export class SearchService {

    constructor(private http: HttpClient) {}
    url: string = "http://0eb9-110-169-220-190.ngrok.io";
    listSearchEq: SearchEqModel[] = []

    getSearchEq(model: SearchEqModel){
        return this.http.get<SearchEqModel[]>(this.url + "/search");
    }

    getSearchRoom(model: SearchRoomModel) {
        return this.http.get<SearchRoomModel[]>(this.url + "/search");
    }
}