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://b872-2405-9800-bc03-3665-282a-83c6-a83e-fc1b.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");
    }
}