import { AfterViewInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
import { NormalizedPermission, PermissionAction } from '@memberjunction/core';
import { ResourceData } from '@memberjunction/core-entities';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { PermissionsDomainGroup, PermissionsUserOption } from './permissions-shared';
import * as i0 from "@angular/core";
/**
 * User Access Report resource — one of three tabs in the Permissions admin application.
 * Lets an admin pick any user and see every resource that user has access to across
 * every registered permission domain. Powered by `PermissionEngine.GetAllUserPermissions`.
 */
export declare class PermissionsUserAccessResourceComponent extends BaseResourceComponent implements OnInit, AfterViewInit, OnDestroy {
    private cdr;
    Users: PermissionsUserOption[];
    SelectedUserId: string | null;
    SelectedUserName: string | null;
    SelectedUserRoles: string[];
    DomainGroups: PermissionsDomainGroup[];
    IsLoadingUsers: boolean;
    IsLoadingPermissions: boolean;
    ErrorMessage: string | null;
    constructor(cdr: ChangeDetectorRef);
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    ngOnInit(): Promise<void>;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    /**
     * Publish the current user-access state to the AI agent. Re-invoked on every
     * meaningful state change (user selection, permission load, group toggle). The
     * shaping lives in the pure {@link buildUserAccessAgentContext} helper.
     */
    private publishAgentContext;
    /** User candidates (id+name) for the tolerant id→name→contains resolver. */
    private userCandidates;
    /**
     * Resolve an agent-supplied user reference: id → name → email → name-contains.
     * Returns the matched option or null. Augments {@link resolvePermissionsCandidate}
     * with an email match (the user picker shows emails too).
     */
    private resolveUserRef;
    /**
     * Register the read-only / review client tools the agent may invoke. Every
     * Handler is tolerant: validates input and returns
     * `{ Success: false, ErrorMessage }` rather than throwing.
     */
    private registerAgentClientTools;
    private handleSelectUserTool;
    private handleSearchUsersTool;
    private handleToggleGroupTool;
    loadUsers(): Promise<void>;
    OnUserChanged(userId: string): Promise<void>;
    private loadPermissionsForSelectedUser;
    ToggleGroup(group: PermissionsDomainGroup): void;
    /** Accordion-driven handler — SETS the emitted expanded value (vs. ToggleGroup's flip). */
    onGroupExpandedChange(group: PermissionsDomainGroup, expanded: boolean): void;
    TrackByDomain(_index: number, group: PermissionsDomainGroup): string;
    TrackByPermission(_index: number, row: NormalizedPermission): string;
    ActionsLabel(actions: PermissionAction[]): string;
    get TotalCount(): number;
    static ɵfac: i0.ɵɵFactoryDeclaration<PermissionsUserAccessResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<PermissionsUserAccessResourceComponent, "mj-permissions-user-access-resource", never, {}, {}, never, never, false, never>;
}
/** Tree-shaking prevention — referenced from `public-api.ts`. */
export declare function LoadPermissionsUserAccessResource(): void;
//# sourceMappingURL=user-access-resource.component.d.ts.map