import { Injectable } from '@angular/core' ; import { ReduxAction } from '../../../harmowatch/ngx-redux-core/decorators/index' ; import { Subject } from 'rxjs' ; @ Injectable ( ) export class BikeActionsProvider { public static readonly addLicensePlateSuccessEmitter = new Subject < void > ( ) ; @ ReduxAction ( { type : 'BikeActionsProvider://add-license-plate' , onDispatchSuccess : BikeActionsProvider . prototype . addLicensePlateSuccess , } ) public addLicensePlate ( licensePlate ) { return Promise . resolve ( licensePlate ) ; } public addLicensePlateSuccess ( ) { BikeActionsProvider . addLicensePlateSuccessEmitter . next ( ) ; } }