import type { PermissionListDto, MatrixRoleDto, RoleCategory } from '@/services/api/adminApi';
export interface ResourceNode {
    id: string;
    path: string;
    label: string;
    /** @deprecated Context level removed — use applicationLabel instead */
    contextLabel?: string;
    applicationLabel: string;
    moduleLabel: string;
    parentModuleLabel?: string;
    parentModuleId?: string;
    parentSectionLabel?: string;
    parentSectionId?: string;
    level: 'module' | 'section' | 'resource';
    permissions: ResourcePermission[];
    totalPermissions: number;
    childSections?: ResourceNode[];
    childResources?: ResourceNode[];
}
export interface ResourcePermission {
    id: string;
    action: string;
    path: string;
}
export interface PermissionInheritanceInfo {
    isDirect: boolean;
    isInherited: boolean;
    inheritedFromPath?: string;
    inheritedFromId?: string;
}
export interface InheritanceMap {
    [roleId: string]: Map<string, PermissionInheritanceInfo>;
}
export interface RolePermissions {
    [roleId: string]: Set<string>;
}
export interface MatrixFilters {
    selectedRoleIds: string[];
    resourceSearch: string;
    applicationFilter: string;
    moduleFilter: string;
    categoryFilter: string;
}
export interface UsePermissionMatrixResult {
    loading: boolean;
    error: string | null;
    saveError: string | null;
    saving: boolean;
    saveSuccess: boolean;
    roles: MatrixRoleDto[];
    resources: ResourceNode[];
    permissions: Map<string, PermissionListDto>;
    assignments: RolePermissions;
    inheritanceMap: InheritanceMap;
    filters: MatrixFilters;
    filteredRoles: MatrixRoleDto[];
    filteredResources: ResourceNode[];
    hasChanges: boolean;
    canEditSystemRoles: boolean;
    applications: {
        app: string;
        label: string;
    }[];
    modules: {
        app: string;
        module: string;
        label: string;
    }[];
    categories: RoleCategory[];
    togglePermission: (roleId: string, permissionId: string) => void;
    toggleAllForRole: (roleId: string, grant: boolean) => void;
    toggleAllForResource: (resourceNode: ResourceNode, grant: boolean) => void;
    updateFilters: (filters: Partial<MatrixFilters>) => void;
    reloadData: () => Promise<void>;
    resetChanges: () => void;
    saveChanges: () => Promise<void>;
    clearSaveError: () => void;
    getPermissionInheritance: (roleId: string, permissionId: string) => PermissionInheritanceInfo;
}
export interface UsePermissionMatrixOptions {
    canEditSystemRoles?: boolean;
}
export declare function usePermissionMatrix(options?: UsePermissionMatrixOptions): UsePermissionMatrixResult;
//# sourceMappingURL=usePermissionMatrix.d.ts.map