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

@Injectable({
  providedIn: 'root'
})
export class EventService {
  private diaryDeletedSource = new Subject<void>();
  
  diaryDeleted$ = this.diaryDeletedSource.asObservable();

  emitDiaryDeleted() {
    this.diaryDeletedSource.next();
  }
}