import { IOpalUserBusinessUnitUser, IOpalUserState } from "@hmcts/opal-frontend-common/services/opal-user-service/interfaces"; import * as i0 from "@angular/core"; export declare class PermissionsService { /** * Retrieves the unique permission IDs associated with the user. * @returns An array of unique permission IDs. */ getUniquePermissions(userState: IOpalUserState | null): number[]; /** * Determines whether the user has access to a specific permission based on their roles. * * This method short-circuits and returns as soon as a matching permission is found for efficiency. * * @param permissionId - The ID of the permission to check for access. * @param roles - An array of user roles, each containing a list of permissions. * @returns `true` if the user has the specified permission in any of their roles, * or if no roles are provided; otherwise, returns `false`. */ hasPermissionAccess(permissionId: number, roles: IOpalUserBusinessUnitUser[]): boolean; /** * Checks if the user has access to a specific permission within a given business unit. * * This method short-circuits and returns as soon as a matching permission is found for efficiency. * * @param permissionId - The ID of the permission to check. * @param businessUnitId - The ID of the business unit to check against. * @param roles - An array of user roles, each containing permissions and associated business unit IDs. * @returns `true` if the user has the specified permission for the business unit, or if no roles are provided; otherwise, `false`. */ hasBusinessUnitPermissionAccess(permissionId: number, businessUnitId: number, roles: IOpalUserBusinessUnitUser[]): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }