/// <reference types="jquery" />
import { AjaxCall, AjaxError, DoEntity, EventHandler, InitModelOf, ObjectModel, Permission, PermissionCollection, PermissionCollectionModel, PermissionLevel, PropertyEventEmitter, SomeRequired, UiNotificationEvent } from '../index';
export declare class AccessControl extends PropertyEventEmitter implements AccessControlModel {
    self: AccessControl;
    model: AccessControlModel;
    initModel: SomeRequired<this['model'], 'permissionsUrl'>;
    permissionsUrl: string;
    protected _permissionCollection: PermissionCollection;
    protected _permissionUpdateEventHandler: EventHandler<UiNotificationEvent>;
    protected _reloadTimeoutId: number;
    protected _call: AjaxCall;
    constructor();
    init(model: InitModelOf<this>): void;
    bootstrap(): JQuery.Promise<void>;
    destroy(): void;
    protected _subscribeForNotifications(): void;
    protected _unsubscribeFromNotifications(): void;
    protected _onPermissionUpdateNotify(event: UiNotificationEvent): void;
    protected _load(): JQuery.Promise<void>;
    protected _loadPermissionCollection(): JQuery.Promise<PermissionCollectionModel, AjaxError>;
    /**
     * Check `permission` against the current {@link PermissionCollection}.
     * Quick check is executed synchronously while non-quick check is executed asynchronously.
     */
    check(permission: Permission, quick: true): boolean;
    check(permission: Permission, quick?: false): JQuery.Promise<boolean>;
    check(permission: Permission, quick?: boolean): boolean | JQuery.Promise<boolean>;
    /**
     * Returns the granted {@link PermissionLevel} for a given permission instance `permission`.
     * - {@link Permission.Level.UNDEFINED} if `permission` is `null` or in general 'not an {@link Permission}'
     * - {@link Permission.Level.NONE} if no level at all is granted to `permission`
     * - {@link PermissionLevel} if the level can be determined exactly.
     * - {@link Permission.Level.UNDEFINED} if there are multiple granted permission levels possible and there is not enough data in the `permission` contained to determine the result closer.
     */
    getGrantedPermissionLevel(permission: Permission): PermissionLevel;
}
export interface AccessControlModel extends ObjectModel<AccessControl> {
    /**
     * URL pointing to a json resource that provides information about permissions (see {@link PermissionCollectionModel}).
     */
    permissionsUrl?: string;
}
export interface PermissionUpdateMessageDo extends DoEntity {
    reloadDelayWindow: number;
}
//# sourceMappingURL=AccessControl.d.ts.map