import { Observable } from 'rxjs/Observable' ; /**
 * Reasons, why you cannot use the API.
 */ export enum AutoTranslateDisabledReasonKey { NO_PROVIDER , NO_KEY , INVALID_KEY , SOURCE_LANG_NOT_SUPPORTED , TARGET_LANG_NOT_SUPPORTED , CONNECT_PROBLEM } export interface AutoTranslateDisabledReason { reason : AutoTranslateDisabledReasonKey ; details ? : string ; } export interface Language { language : string ; name : string ; } /**
 * Interface of AutoTranslate Service API.
 * An AutoTranslateService can translate messages to other languages.
 */ export class AutoTranslateServiceAPI { public apiKey ( ) { return null ; } public setApiKey ( apiKey ) { } param source param target public canAutoTranslate ( source , target ) { return Observable . of ( false ) ; } param source param target return { AutoTranslateDisabledReason } public disabledReason ( source , target ) { return Observable . of ( { reason : AutoTranslateDisabledReasonKey . NO_PROVIDER } ) ; } param target supportedLanguages ( target ? ) { return Observable . of ( [ ] ) ; } param message param from param to return public translate ( message , from , to ) { return Observable . throw ( 'no translation service installed' ) ; } param messages param from param to return public translateMultipleStrings ( messages , from , to ) { return Observable . throw ( 'no translation service installed' ) ; } }