import type { ResourceNode, GroupedResources, GroupedResourcesWithSections, SectionWithResources, PermissionStatus } from '@/components/admin/permissions/types';
/**
 * Groups resources by context and application hierarchy.
 * Only includes modules (level === 'module'), not sections.
 */
export declare function groupResourcesByContext(resources: ResourceNode[]): GroupedResources[];
/**
 * Groups resources by context and application hierarchy, including sections and resources.
 * Returns a hierarchical structure: modules -> sections -> resources
 */
export declare function groupResourcesWithSections(resources: ResourceNode[]): GroupedResourcesWithSections[];
/**
 * Calculates the permission status for a resource based on granted permissions.
 * Returns both the status and the count of granted permissions.
 * For modules, this only counts the module's own permissions, not child sections.
 */
export declare function calculatePermissionStatus(resource: ResourceNode, isPermissionGranted: (permissionId: string) => boolean): {
    status: PermissionStatus;
    grantedCount: number;
};
/**
 * Calculates the permission status for a module including all child sections and resources.
 * Returns the total count across module, sections, and resources.
 */
export declare function calculateModuleWithSectionsStatus(module: ResourceNode, sections: SectionWithResources[], isPermissionGranted: (permissionId: string) => boolean): {
    status: PermissionStatus;
    grantedCount: number;
    totalCount: number;
};
/**
 * Filters resources by status.
 */
export declare function filterResourcesByStatus(resources: ResourceNode[], statusFilters: Set<PermissionStatus>, getStatus: (resource: ResourceNode) => PermissionStatus): ResourceNode[];
/**
 * Returns the background color class for a cell based on permission status.
 */
export declare function getPermissionCellBackground(status: PermissionStatus): string;
//# sourceMappingURL=permissionUtils.d.ts.map