import { Observable } from 'rxjs';
import { Permission } from '../../common/generated-types';
import { DataService } from '../../data/providers/data.service';
import * as i0 from "@angular/core";
export interface AlertConfig<T = any> {
    id: string;
    check: () => T | Promise<T> | Observable<T>;
    recheckIntervalMs?: number;
    isAlert: (value: T) => boolean;
    action: (data: T) => void;
    label: (data: T) => {
        text: string;
        translationVars?: {
            [key: string]: string | number;
        };
    };
    requiredPermissions?: Permission[];
}
export interface ActiveAlert {
    id: string;
    runAction: () => void;
    hasRun: boolean;
    label: {
        text: string;
        translationVars?: {
            [key: string]: string | number;
        };
    };
}
export declare class Alert<T> {
    private config;
    activeAlert$: Observable<ActiveAlert | undefined>;
    private hasRun$;
    private data$;
    constructor(config: AlertConfig<T>);
    get id(): string;
    runCheck(): void;
}
export declare class AlertsService {
    private dataService;
    activeAlerts$: Observable<ActiveAlert[]>;
    private alertsMap;
    private configUpdated;
    constructor(dataService: DataService);
    configureAlert<T>(config: AlertConfig<T>): void;
    hasSufficientPermissions(permissions?: Permission[]): Observable<boolean>;
    refresh(id?: string): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AlertsService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AlertsService>;
}
