import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';

@Injectable({
  providedIn: 'root',
})
export class CatalogAvailabilityService {
  private readonly availabilityChangedSubject = new Subject<void>();

  readonly availabilityChanged$: Observable<void> = this.availabilityChangedSubject.asObservable();

  notifyAvailabilityChanged(): void {
    this.availabilityChangedSubject.next();
  }
}
