import { ConfigurationsService, DomainConfService } from '@sunbird-cb/utils-v2';
import { NsContent } from '../_services/widget-content.model';
import { HttpClient } from '@angular/common/http';
import { Observable, Subject } from 'rxjs';
import { AppTocService } from './app-toc.service';
import { ContentLanguageService, WidgetUserServiceLib } from '@sunbird-cb/consumption';
import { WidgetContentService } from '../_collection-api';
import * as i0 from "@angular/core";
export declare class ViewerUtilService {
    private http;
    private configservice;
    private contentSvc;
    private tocSvc;
    private userSvc;
    private contentLangSvc;
    private domainConfSvc;
    private environment;
    API_ENDPOINTS: {
        setS3Cookie: string;
        PROGRESS_UPDATE: string;
        ASSESSMENT_SECTION: string;
        GET_FORM_BYID: (formId: string) => string;
        SUBMIT_FORM: string;
        PRE_ASSESSMENT_STATE_UPDATE: string;
    };
    downloadRegex: RegExp;
    authoringBase: string;
    markAsCompleteSubject: Subject<unknown>;
    autoPlayNextVideo: Subject<unknown>;
    autoPlayNextAudio: Subject<unknown>;
    forPreview: boolean;
    publicUserDetails: any;
    constructor(http: HttpClient, configservice: ConfigurationsService, contentSvc: WidgetContentService, tocSvc: AppTocService, userSvc: WidgetUserServiceLib, contentLangSvc: ContentLanguageService, domainConfSvc: DomainConfService, environment: any);
    fetchManifestFile(url: string): Promise<any>;
    private setS3Cookie;
    calculatePercent(current: string[], max: number, mimeType?: string): number;
    getStatus(current: string[], max: number, mimeType?: string): 1 | 2;
    realTimeProgressUpdate(contentId: string, request: any, collectionId?: string, batchId?: string): void;
    getBatchIdAndCourseId(courseId: string, batchId: string, resourceId: string): {
        courseId: string;
        batchId: string;
    };
    /**
     * Recursively searches for a resource ID in a content's children hierarchy
     * @param content The content object to search in
     * @param resourceId The resource ID to find
     * @returns true if resource is found, false otherwise
     */
    private findResourceInContent;
    /**
     * Finds the course that contains a given resource ID in a Learning Pathway
     * @param learningPathwayContent The Learning Pathway content data
     * @param resourceId The resource ID to find
     * @returns The course object containing the resource, or null if not found
     */
    findCourseContainingResource(learningPathwayContent: any, resourceId: string): any;
    getResourceContentLanguage(resourceId: string): any;
    checkForCourseEnrollment(childList: NsContent.IContent, _resourceId: string, _enrollmentList: any, _tempData: any): Promise<any>;
    realTimeProgressUpdateQuiz(contentId: string, collectionId?: string, batchId?: string, status?: number): void;
    getContent(contentId: string): Observable<NsContent.IContent>;
    getAuthoringUrl(url: string): string;
    regexDownloadReplace: (_str: string, group1: string, group2: string) => string;
    replaceToAuthUrl(data: any): any;
    readSections(assessmentId: string): string;
    getPublicUrl(url: string): string;
    getCdnUrl(url: string): string;
    fetchContent(id: string, type: string): Observable<NsContent.IContent>;
    updateContentHashMapForAssesstent(contentId: string, contentProgress: any): void;
    getFormById(formId: string): Observable<Object>;
    submitForm(formData: any): Observable<any>;
    realTimeProgressUpdateForPreAssessment(contentId: string, request: any): void;
    realTimeProgressUpdateForPreAssessmentQuiz(contentId: string, status?: number, mimeType?: string): void;
    getPreAssessmentResourceStatus(resourceId: string): any;
    static ɵfac: i0.ɵɵFactoryDeclaration<ViewerUtilService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ViewerUtilService>;
}
//# sourceMappingURL=viewer-util.service.d.ts.map