import { TranslationProject } from './translation-project' ; import { InjectionToken } from '@angular/core' ; /**
 * Interface of BackendService.
 * A BackendService can store and retrieve translation projects.
 * It also can store an API key for Google Translate.
 */ export class BackendServiceAPI { /**
     * Store a project.
     */ store ( project ) { } /**
     * Get all stored projects.
     */ projects ( ) { return [ ] ; } param id storeCurrentProjectId ( id ) { } return { string } currentProjectId ( ) { return null ; } param tuId storeCurrentTransUnitId ( tuId ) { } return { string } currentTransUnitId ( ) { return null ; } param project deleteProject ( project ) { } param key storeAutoTranslateApiKey ( key ) { } return { null } autoTranslateApiKey ( ) { return null ; } return { string } static generateUUID ( ) { var d = new Date ( ) . getTime ( ) ; if ( typeof performance !== 'undefined' && typeof performance . now === 'function' ) { d += performance . now ( ) ; } return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' . replace ( /[xy]/g , function ( c ) { var r = ( d + Math . random ( ) * 16 ) % 16 | 0 ; d = Math . floor ( d / 16 ) ; return ( c === 'x' ? r : ( r & 0x3 | 0x8 ) ) . toString ( 16 ) ; } ) ; } }