import { Injectable } from '@angular/core';
import { OFFERS } from '../mocks/offers';
import Offer from '../models/offer';

@Injectable({
    providedIn: 'root'
})
export class OfferService {
    offers: Array<Offer>;

    constructor() {
        this.offers = OFFERS;
    }

    public async getOfferByID(id: string) {
        return this.offers.find((offer) => offer.id === id);
    }

}
