import { TranslateService } from '@ngx-translate/core';
import { AlertService, LanguageTranslateService, TerminologyService } from '@tilde-nlp/ngx-common';
import { Observable } from 'rxjs';
import { TextToSpeechSettings } from '../../../components/shared/text-to-speech/models/text-to-speech-settings.model';
import { TldHighlightService, TldTranslateConfigService, TldTranslateSystemManagementService } from '../../tld-common/services';
import { TldScrollService } from '../../tld-common/services/scroll/tld-scroll.service';
import { Dictionary } from '../models/dictionary.model';
import { IHighlightTree } from '../models/highlight-tree.model';
import { IParagraphInfo } from '../models/highlight.model';
import { IRetranslateParams } from '../models/retranslate-params.model';
import { TldTranslateTextApiService } from './api/tld-translate-text-api.service';
import { LanguageDetectionService } from '../../tld-common/services/language-detection.service';
import { SourceChangeEvent } from '../models/source-change-event.model';
import * as i0 from "@angular/core";
export declare class TldTranslateTextService {
    private readonly api;
    private readonly systemManagementService;
    private readonly tldScrollService;
    private readonly configService;
    private readonly translate;
    private readonly highlightService;
    private readonly alertsService;
    private readonly terminologyService;
    private readonly language;
    private readonly languageTranslate;
    private _sourceText;
    get sourceText(): string;
    private _sourceTextHypothesis;
    get sourceTextHypothesis(): string;
    private _sourceChange;
    get sourceChange(): Observable<SourceChangeEvent>;
    private _sourceScroll;
    get sourceScroll(): Observable<number>;
    private _translateButtonClick;
    get translateButtonClick(): Observable<any>;
    private _hasDictionary;
    get hasDictionary(): boolean;
    set hasDictionary(val: boolean);
    private _dictionaryEntry;
    get dictionaryEntry(): Dictionary[];
    set dictionaryEntry(val: Dictionary[]);
    get translatedText(): string;
    private readonly _onClear;
    previousText: string;
    previousDetectedLang: string;
    urlToTranslate: string;
    paragraphs: IParagraphInfo[];
    sourceParagraphs: IHighlightTree[];
    targetParagraphs: IHighlightTree[];
    isSystemWakingUp: boolean;
    trgLangBeforeDetect: string;
    isUnsupportedLangWarningVisible: boolean;
    textToSpeechSourceSettings: TextToSpeechSettings;
    textToSpeechTargetSettings: TextToSpeechSettings;
    private _firstParagraphTranslated;
    get firstParagraphTranslated(): boolean;
    private dictionarySubscription;
    private paragraphTranslationsSubject;
    private paragraphTranslationSubscription;
    private readonly debouncer;
    private debouncerSubscription;
    /** How many paragraphs can be translated at the same time. */
    private readonly CONCURRENT_UPLOADS;
    private readonly DEBOUNCE_TIME;
    private readonly standbyEngineNotificationErrorKey;
    private readonly standbySystemRetranslationTimeout;
    private readonly engineTermCollectionNotFoundErrorKey;
    /** Whether progress indicator should be shown. This value must be set to true only if configured time has passed. */
    private _shouldShowProgressIndicator;
    get shouldShowProgressIndicator(): boolean;
    private progressIndicatorTimeout;
    private _untranslatedParagraphCount;
    get untranslatedParagraphCount(): number;
    set untranslatedParagraphCount(value: number);
    get isTranslating(): boolean;
    get allowWebsiteTranslation(): boolean;
    get autoRedirectToWebTranslate(): boolean;
    get webWidgetRedirectUrlPrefix(): string;
    get webWidgetRedirectUrlPosfix(): string;
    get useDictionary(): boolean;
    get progressIndicatorTimeoutMiliSeconds(): number;
    get terminologyPortalUrl(): string;
    get activeData(): import("@tilde-nlp/ngx-common").System;
    get translateUrlRedirect(): string;
    /** If dictattion is active. Based on this, extensions are hidden. */
    isDictating: boolean;
    constructor(api: TldTranslateTextApiService, systemManagementService: TldTranslateSystemManagementService, tldScrollService: TldScrollService, configService: TldTranslateConfigService, translate: TranslateService, highlightService: TldHighlightService, alertsService: AlertService, terminologyService: TerminologyService, language: LanguageDetectionService, languageTranslate: LanguageTranslateService);
    changeSource(event: SourceChangeEvent): void;
    changeSourceHypothesis(text: string): void;
    onSourceScroll(offsetTop: number): void;
    onTranslateButtonClick(): void;
    clearSource(): void;
    onClear(): Observable<any>;
    updateTranslation(options: string, systemID: string, text: string, translation: string): Observable<never>;
    listenOnChanges(): void;
    stopListeningToChanges(): void;
    retranslate(params?: IRetranslateParams, detectedLanguage?: string): void;
    /** Stops text translation if it is active. */
    stopTranslation(): void;
    private resetDetectedLanguage;
    private recreateParagraphTranslationSubject;
    private translateParagraph;
    private getEmptyTranslationResponse;
    private handleTranslatedParagraph;
    private updateParagraphs;
    private clearSourceParams;
    private prepareAndTranslateWords;
    private setDictionaryTerms;
    private translateText;
    /** Creates timeout which enables progress indicator after given miliseconds */
    private setProgressIndicatorTimeout;
    /** Method for setting necessary properties to make progress indicator visible. */
    private showProgressIndicator;
    /** Method for setting necessary properties to make progress indicator hidden. */
    hideProgressIndicator(): void;
    private toggleTextToSpeech;
    private findTextToSpeechSettings;
    private removeDictionaryDrafts;
    static ɵfac: i0.ɵɵFactoryDeclaration<TldTranslateTextService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<TldTranslateTextService>;
}
