import { OnInit, OnDestroy, Renderer2, SimpleChanges, ChangeDetectorRef } from '@angular/core';
import { NsContent } from '../../../../_services/widget-content.model';
import { NsAppToc } from '../../../../models/app-toc.model';
import { EventService, ConfigurationsService } from '@sunbird-cb/utils-v2';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import { CertificateService } from '../../../../services/certificate.service';
import { AppTocService } from '../../../../services/app-toc.service';
import { Subscription } from 'rxjs';
import { ContentLanguageService } from '@sunbird-cb/consumption';
import { ResourceDownloadHelperService } from '../../../../services/resource-download-helper.service';
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
import * as i0 from "@angular/core";
export declare class AppTocContentCardV2Component implements OnInit, OnDestroy {
    private events;
    private dialog;
    private renderer;
    private certificateService;
    private appTocSvc;
    private contentLangSvc;
    private resourceDownloadHelperSvc;
    private configSvc;
    private snackBar;
    private cdr;
    content: NsContent.IContent | null;
    expandAll: boolean;
    rootId: string;
    rootContentType: string;
    forPreview: boolean;
    batchId: string;
    componentName: string;
    index: number;
    pathSet: any;
    expandActive: boolean;
    hierarchyMapData: any;
    batchData: /**NsContent.IBatchListResponse */ any | null;
    isPreAssessment: boolean;
    baseContentReadData: NsContent.IContent | null;
    mlCourse: NsContent.IContent | null;
    parentMilestoneLocked: boolean;
    hasContentStructure: boolean;
    downloadCertificateLoading: boolean;
    enumContentTypes: typeof NsContent.EDisplayContentTypes;
    contentStructure: NsAppToc.ITocStructure;
    defaultThumbnail: string;
    viewChildren: boolean;
    primaryCategory: typeof NsContent.EPrimaryCategory;
    pageScrollSubscription: Subscription | null;
    hashmapUpdatedSubscription: Subscription | null;
    achievementLoading: boolean;
    private _cachedIsCollection;
    private _cachedIsModule;
    private _cachedIsResource;
    private _cachedIsMilestone;
    private _cachedIsMilestoneLocked;
    private _cachedIsParentMilestoneLocked;
    private _cachedIsContentUnlocked;
    private _cachedCheckForCuratedProgram;
    private _cachedIsMilestoneAssessment;
    private _cachedIsMilestoneAssessmentLocked;
    private _cachedResourceLink;
    private _cachedMilestoneCompletedCount;
    private _cacheInitialized;
    constructor(events: EventService, dialog: MatDialog, renderer: Renderer2, certificateService: CertificateService, appTocSvc: AppTocService, contentLangSvc: ContentLanguageService, resourceDownloadHelperSvc: ResourceDownloadHelperService, configSvc: ConfigurationsService, snackBar: MatSnackBar, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    /**
     * Initialize all computed properties once to avoid expensive getter calculations
     * on every change detection cycle
     */
    private initializeComputedProperties;
    /**
     * Compute all cached properties at once for performance optimization
     */
    private computeAllCachedProperties;
    private computeIsResource;
    private computeIsMilestone;
    private computeCheckForCuratedProgram;
    private computeIsContentUnlocked;
    private computeResourceLink;
    private computeIsMilestoneLocked;
    private computeIsParentMilestoneLocked;
    /**
     * Check if current content is a MILESTONE assessment (DIRECT child of a Milestone)
     * IMPORTANT: This should NOT return true for course assessments inside courses within milestones
     * Only assessments that are direct children of milestones should be locked by milestone logic
     */
    private computeIsMilestoneAssessment;
    /**
     * Check if milestone assessment should be locked
     * Assessment is locked if:
     * 1. It's an assessment that is a DIRECT child of a milestone
     * 2. The parent milestone is unlocked (otherwise handled by parent milestone lock)
     * 3. NOT all mandatory courses in the same milestone are completed
     */
    private computeIsMilestoneAssessmentLocked;
    resourceScroll(): void;
    changeResource(): void;
    ngOnChanges(changes: SimpleChanges): void;
    check(content: any): any;
    get isCollection(): boolean;
    get isModule(): boolean;
    checkModule(content: NsContent.IContent | null): boolean;
    checkIsModule(content: any): boolean;
    get isBatchInProgess(): boolean;
    get isResource(): boolean;
    get resourceLink(): {
        url: string;
        queryParams: {
            [key: string]: any;
        };
    };
    progressColor(): string;
    progressColor2(): string;
    private evaluateImmediateChildrenStructure;
    get contextPath(): {
        contextId: string;
        contextPath: string;
        batchId: string;
    };
    contentTrackBy(_index: number, content: NsContent.IContent): string;
    raiseTelemetry(): void;
    get isAllowed(): boolean;
    get isEnabled(): boolean;
    get isEnrolled(): boolean;
    updateChildParentMap(identifier: string): any;
    getCompletionPercentage(identifier: string): number;
    roundIfDecimal(value: number): number;
    getCompletionStatus(identifier: string): any;
    /**
     * Check if milestone is complete based on mandatory content and assessment completion
     * Returns true only when:
     * 1. All mandatory content is completed (or no mandatory content exists)
     * 2. Milestone assessment is completed (or no assessment exists)
     */
    isMilestoneComplete(identifier: string): boolean;
    openCertificateDialog(certData: any): void;
    scrollView(): void;
    downloadCertificate(certificateData: any): void;
    ngOnDestroy(): void;
    get checkForCuratedProgram(): boolean;
    get isContentUnlocked(): boolean;
    get isParentMilestoneLocked(): boolean;
    get isMilestoneLocked(): boolean;
    get isMilestoneAssessment(): boolean;
    get isMilestoneAssessmentLocked(): boolean;
    /**
     * Check if a milestone's mandatory courses and assessment are completed.
     * Looks at the content hierarchy to find children of the milestone.
     */
    private checkMilestoneContentCompletion;
    /**
     * Fallback: Check if enough assessments are completed to unlock this milestone.
     * For milestone at index N, we need at least N completed assessments.
     * E.g., For M2 (index 1), we need 1 completed assessment (M1's assessment)
     *       For M3 (index 2), we need 2 completed assessments (M1's and M2's)
     */
    private checkMilestoneAssessmentCompletion;
    private findContentInHierarchy;
    get computedQueryParams(): {
        preAssessment: string;
    };
    get isMilestone(): boolean;
    getMilestoneCompletedCount(): number;
    private computeMilestoneCompletedCount;
    /**
     * Get unlock criteria message for locked milestones
     */
    getMilestoneUnlockMessage(): string;
    /**
     * Get lock message for content inside locked milestones
     */
    getParentMilestoneLockMessage(): string;
    /**
     * Get lock message for milestone assessments
     */
    getAssessmentLockMessage(): string;
    shouldShowDownloadButton(content: NsContent.IContent | null): boolean;
    downloadContent(content: NsContent.IContent, event?: MouseEvent): void;
    /**
     * View milestone achievement - calls the achievement API and shows the result
     */
    viewMilestoneAchievement(event: MouseEvent, mileStoneData: any): void;
    /**
      * Check if text is truncated (has ellipsis) - for single line text
      * @param element The HTMLElement to check
      * @returns true if text is truncated, false otherwise
      */
    isTextTruncated(element: HTMLElement): boolean;
    /**
     * @param element The HTMLElement to check
     * @returns true if text is truncated, false otherwise
     */
    isMultiLineTruncated(element: HTMLElement): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<AppTocContentCardV2Component, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AppTocContentCardV2Component, "ws-widget-app-toc-content-card-v2", never, { "content": { "alias": "content"; "required": false; }; "expandAll": { "alias": "expandAll"; "required": false; }; "rootId": { "alias": "rootId"; "required": false; }; "rootContentType": { "alias": "rootContentType"; "required": false; }; "forPreview": { "alias": "forPreview"; "required": false; }; "batchId": { "alias": "batchId"; "required": false; }; "componentName": { "alias": "componentName"; "required": false; }; "index": { "alias": "index"; "required": false; }; "pathSet": { "alias": "pathSet"; "required": false; }; "expandActive": { "alias": "expandActive"; "required": false; }; "hierarchyMapData": { "alias": "hierarchyMapData"; "required": false; }; "batchData": { "alias": "batchData"; "required": false; }; "isPreAssessment": { "alias": "isPreAssessment"; "required": false; }; "baseContentReadData": { "alias": "baseContentReadData"; "required": false; }; "mlCourse": { "alias": "mlCourse"; "required": false; }; "parentMilestoneLocked": { "alias": "parentMilestoneLocked"; "required": false; }; }, {}, never, never, false, never>;
}
//# sourceMappingURL=app-toc-content-card-v2.component.d.ts.map