import { OnDestroy } from '@angular/core'; import { UserIdleService } from 'angular-user-idle'; import { BehaviorSubject, Subject } from 'rxjs'; import { MatDialog } from '@angular/material/dialog'; import { UserIdleSessionMsg, UserIdleSessionConfig, ModalOptions, IdleSessionModalConfig } from '@ieeesa-npm/models'; import { Router } from '@angular/router'; import * as i0 from "@angular/core"; /** * Service for managing user idle sessions. * UserIdleSessionService allows tracking user inactivity and triggering actions based on user inactivity. * It provides methods for starting, pausing and stopping the idle session timer, as well as configuring its behavior. * @class UserIdleSessionService * @implements {OnDestroy} */ export declare class UserIdleSessionService implements OnDestroy { dialog: MatDialog; private userIdle; private router; private modalConfig; destroy$: Subject; timer: BehaviorSubject; screenTexts: any; isTimeoutDialogOpened: boolean; userIdleSessionModalOptions: ModalOptions; isSessionExpired: boolean; routeUrl: string; constructor(dialog: MatDialog, userIdle: UserIdleService, router: Router, modalConfig: IdleSessionModalConfig); /** * Initializes the user idle session service. * @param {UserIdleSessionConfig} userIdleSessionConfig - User idle session configuration data such as idleTimeInSeconds, idleTimeoutInSeconds, ping and idle session notification info. * @return -returns nothing */ init(userIdleSessionConfig: UserIdleSessionConfig, userIdleSessionMsg: UserIdleSessionMsg): void; /** * Start watching for user inactivity * @return -returns nothing */ startWatchingUserInactivity(): void; /** * Start watching when user idle is starting. * @return -returns nothing */ watchIdleTimeOutStart(userIdleSessionConfig: UserIdleSessionConfig, userIdleSessionMsg: UserIdleSessionMsg): void; /** * Reset timer to capture user inactivity * @return -returns nothing */ resetIdleTimer(): void; /** * Stops idle timer * @return -returns nothing */ stopIdleTimer(): void; /** * Stops watching user inactivity. * @return -returns nothing */ stopWatchingUserInactivity(): void; /** * It watches idle timeout expire. * @return -returns nothing */ watchIdleTimedOutExpire(): void; /** * Notifies user by opening modal with warning message that your session is about to expire! * @param {number} idleSeconds -The time to convert. * @param {UserIdleSessionConfig} userIdleSessionConfig - User idle session configuration data such as idleTimeInSeconds, idleTimeoutInSeconds, ping and idle session notification info. * @return -returns nothing */ notifyUserInactivity(idleSeconds: number, userIdleSessionConfig: UserIdleSessionConfig, userIdleSessionMsg: UserIdleSessionMsg): void; /** * Converts given time to a time string. * @private * @param {number} time -The time to convert. * @return {string} -Returns timeString */ private convertSecondToTimeString; /** * Sets isSessionExpired to true or false. * @param {boolean} status -Status true or false value * @memberof UserIdleSessionService */ setSessionExpiry(status: boolean): void; /** * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed. * @return -returns nothing */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }