import { Injectable } from '@angular/core' ; import { IFeedbackService } from '../feedback' ; import { Feedback , AddedWord } from '../entities/feedback' ; import { getLogger } from 'util/logging' ; const logger = getLogger ( 'MockFeedbackService' ) ; @ Injectable ( ) export class MockFeedbackService implements IFeedbackService { public sendFeedback ( feedback ) { return new Promise ( ( resolve ) => { setTimeout ( ( ) => { logger . log ( 'Submitted feedback: ' + feedback . content ) ; resolve ( ) ; } , 2000 ) ; } ) ; } public addWord ( word ) { return new Promise ( ( resolve ) => { setTimeout ( ( ) => { logger . log ( 'Added word: ' + word . englishWord ) ; resolve ( ) ; } , 2000 ) ; } ) ; } }