import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
export interface PermissionRequest {
    resource: string;
    action: string;
    context?: {
        [key: string]: any;
    };
}
export interface PermissionResponse {
    allowed: boolean;
    resource: string;
    action: string;
    reason?: string;
}
export interface CheckAccessRequest {
    permissions: PermissionRequest[];
}
export interface CheckAccessResponse {
    results: PermissionResponse[];
}
export interface AuthServiceInterface {
    isAuthenticated(): boolean;
    getAccessToken(): string | null;
}
export declare class PermissionService {
    private http;
    private authService?;
    private readonly PERMISSION_ENDPOINT;
    private permissionCache;
    private cacheExpiry;
    private readonly CACHE_DURATION;
    constructor(http: HttpClient, authService?: AuthServiceInterface | undefined);
    /**
     * Check access for a single permission
     */
    checkAccess(resource: string, action: string, context?: {
        [key: string]: any;
    }): Observable<boolean>;
    /**
     * Check access for multiple permissions
     */
    checkMultipleAccess(permissions: PermissionRequest[]): Observable<PermissionResponse[]>;
    /**
     * Check if user can read a resource
     */
    canRead(resource: string, context?: {
        [key: string]: any;
    }): Observable<boolean>;
    /**
     * Check if user can write to a resource
     */
    canWrite(resource: string, context?: {
        [key: string]: any;
    }): Observable<boolean>;
    /**
     * Check if user can delete a resource
     */
    canDelete(resource: string, context?: {
        [key: string]: any;
    }): Observable<boolean>;
    /**
     * Check if user can execute an action on a resource
     */
    canExecute(resource: string, action: string, context?: {
        [key: string]: any;
    }): Observable<boolean>;
    /**
     * Clear permission cache
     */
    clearCache(): void;
    /**
     * Clear expired cache entries
     */
    clearExpiredCache(): void;
    /**
     * Generate cache key for permission
     */
    private getCacheKey;
    /**
     * Get cached permission result
     */
    private getCachedPermission;
    /**
     * Cache permission result
     */
    private cachePermission;
    static ɵfac: i0.ɵɵFactoryDeclaration<PermissionService, [null, { optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<PermissionService>;
}
