import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import * as i0 from '@angular/core'; import { PipeTransform, OnDestroy, ChangeDetectorRef, ModuleWithProviders } from '@angular/core'; type RpxLanguage = 'en' | 'cy'; declare enum YesOrNoValue { YES = "Yes", NO = "No" } type ValidityDurationSpec = { years?: number; quarters?: number; months?: number; weeks?: number; days?: number; hours?: number; minutes?: number; seconds?: number; milliseconds?: number; }; declare class RpxTranslationConfig { validity: ValidityDurationSpec; baseUrl: string; debounceTimeMs: number; testMode: boolean; } type Replacements = { [key: string]: string; }; declare class RpxTranslationService { private config; private http; private currentLanguage; private languageKey; private phrases; private observables; private requesting; private requestTimerSubscription; private languageSource; language$: Observable; get language(): RpxLanguage; set language(lang: RpxLanguage); constructor(config: RpxTranslationConfig, http: HttpClient); getTranslation$(phrase: string): Observable; getTranslationWithReplacements$(phrase: string, replacements: Replacements): Observable; getTranslationWithYesOrNo$(phrase: string, yesOrNoValue: string): Observable; private getTranslatedData; private normalisePhraseSpacing; private translate; private shouldTranslate; private load; private persistLanguage; private getPersistedLanguage; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class RpxTranslatePipe implements PipeTransform, OnDestroy { private translationService; private asyncPipe; constructor(translationService: RpxTranslationService, changeDetectorRef: ChangeDetectorRef); transform(value: T, replacements?: Replacements | null, yesOrNoValue?: string): T | null; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class RpxTranslationModule { static forRoot(config: RpxTranslationConfig): ModuleWithProviders; static forChild(): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { RpxTranslatePipe, RpxTranslationConfig, RpxTranslationModule, RpxTranslationService, YesOrNoValue }; export type { Replacements, RpxLanguage, ValidityDurationSpec };