import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import { Product } from './product';

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

  private products = [
    {
      name: 'Kamera internetowa',
      price: 100
    },
    {
      name:  'Mikrofon',
      price: 200
    },
    {
      name: 'Klawitura bezprzewodowa',
      price: 85
    }
  ];

  constructor() { }

  getProducts(): Observable<Product[]> {
    return of(this.products);
  }

}
