import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { EntityInfo, CompositeKey } from '@memberjunction/core';
import { TreeBranchConfig, TreeLeafConfig, TreeNode, TreeComponent } from '@memberjunction/ng-trees';
import { RecentItem, FavoriteItem, AppEntityGroup } from '../../models/explorer-state.interface';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import * as i0 from "@angular/core";
/**
 * Event emitted when a record should be opened in a full tab
 */
export interface OpenRecordEvent {
    entityName: string;
    compositeKey: CompositeKey;
}
/**
 * Event emitted when a record should be selected within Data Explorer (not full tab)
 */
export interface SelectRecordEvent {
    entityName: string;
    recordId: string;
}
export declare class NavigationPanelComponent extends BaseAngularComponent implements OnChanges, OnInit, OnDestroy {
    private cdr;
    constructor(cdr: ChangeDetectorRef);
    entities: EntityInfo[];
    selectedEntityName: string | null;
    favorites: FavoriteItem[];
    recentItems: RecentItem[];
    collapsed: boolean;
    /**
     * Optional set of allowed entity names for filtering favorites/recents.
     * If provided, only items matching these entities will be shown.
     */
    allowedEntityNames: Set<string> | null;
    /** Application-based entity groups from the parent dashboard */
    appEntityGroups: AppEntityGroup[];
    /** Optional application ID filter for the tree */
    applicationIdFilter: string | null;
    favoritesSectionExpanded: boolean;
    recentSectionExpanded: boolean;
    entitiesSectionExpanded: boolean;
    viewsSectionExpanded: boolean;
    entitySelected: EventEmitter<EntityInfo>;
    toggleCollapse: EventEmitter<void>;
    sectionToggled: EventEmitter<"entities" | "views" | "favorites" | "recent">;
    openRecord: EventEmitter<OpenRecordEvent>;
    /** Emitted when a record should be selected within Data Explorer (navigate to entity + select record) */
    selectRecord: EventEmitter<SelectRecordEvent>;
    /** Emitted when a collapsed icon is clicked - expands panel and focuses section */
    expandAndFocus: EventEmitter<"entities" | "favorites" | "recent">;
    /** Emitted when a nav panel app group is toggled */
    appGroupToggled: EventEmitter<string>;
    private get metadata();
    treeBranchConfig: TreeBranchConfig;
    treeLeafConfig: TreeLeafConfig;
    entityTree?: TreeComponent;
    /** Selected entity ID for tree highlighting */
    selectedEntityIds: string[];
    /** Search term for filtering the entity tree */
    entitySearchTerm: string;
    ngOnChanges(changes: SimpleChanges): void;
    ngOnInit(): void;
    ngOnDestroy(): void;
    /**
     * Update the selected entity IDs for tree highlighting when selected entity changes
     */
    private updateSelectedEntityKey;
    /**
     * Update the tree's branch filter when application filter changes
     */
    private updateTreeBranchFilter;
    /**
     * Filter the entity tree when search term changes
     */
    onEntitySearchChanged(): void;
    /**
     * Clear the entity search
     */
    clearEntitySearch(): void;
    /**
     * Handle tree selection change - map TreeNode to EntityInfo and emit
     */
    onTreeEntitySelected(nodes: TreeNode[]): void;
    /**
     * Get recent items filtered by allowed entities (if filter is active)
     */
    get filteredRecentItems(): RecentItem[];
    /**
     * Get favorites filtered to records only (respecting entity filter)
     */
    get favoriteRecords(): FavoriteItem[];
    /**
     * Get favorites filtered to entities only (respecting entity filter)
     */
    get favoriteEntities(): FavoriteItem[];
    /**
     * Handle entity click
     */
    onEntityClick(entity: EntityInfo): void;
    /**
     * Handle favorite click - navigates to entity and selects record within Data Explorer
     */
    onFavoriteClick(favorite: FavoriteItem): void;
    /**
     * Handle recent item click - navigates to entity and selects record within Data Explorer
     */
    onRecentClick(item: RecentItem): void;
    /**
     * Handle section header click
     */
    onSectionToggle(section: 'favorites' | 'recent' | 'entities' | 'views'): void;
    /**
     * Handle collapse toggle
     */
    onToggleCollapse(): void;
    /**
     * Handle collapsed icon click - expands panel and focuses section
     */
    onCollapsedIconClick(section: 'favorites' | 'recent' | 'entities'): void;
    /**
     * Check if entity is selected
     */
    isEntitySelected(entity: EntityInfo): boolean;
    /**
     * Get icon for entity
     */
    getEntityIcon(entity: EntityInfo): string;
    /**
     * Cache of formatted relative-time labels keyed by timestamp epoch ms.
     * Stable within a change-detection cycle (avoids NG0100 from `now`-dependent
     * values shifting between dirty-check and verify passes). Cleared on a coarse
     * interval so the displayed label still updates over time.
     */
    private timestampLabelCache;
    private timestampRefreshHandle?;
    /**
     * Format recent item timestamp. Cached per-timestamp so the same value is
     * returned across change-detection passes within a single tick — recomputed
     * on a 30-second interval (see `ngOnInit`).
     */
    formatTimestamp(timestamp: Date): string;
    private computeRelativeLabel;
    /**
     * Get icon for a recent item based on its entity
     */
    getRecentItemIcon(item: RecentItem): string;
    /**
     * Get icon for a favorite item based on its type and entity
     */
    getFavoriteIcon(favorite: FavoriteItem): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<NavigationPanelComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NavigationPanelComponent, "mj-explorer-navigation-panel", never, { "entities": { "alias": "entities"; "required": false; }; "selectedEntityName": { "alias": "selectedEntityName"; "required": false; }; "favorites": { "alias": "favorites"; "required": false; }; "recentItems": { "alias": "recentItems"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "allowedEntityNames": { "alias": "allowedEntityNames"; "required": false; }; "appEntityGroups": { "alias": "appEntityGroups"; "required": false; }; "applicationIdFilter": { "alias": "applicationIdFilter"; "required": false; }; "favoritesSectionExpanded": { "alias": "favoritesSectionExpanded"; "required": false; }; "recentSectionExpanded": { "alias": "recentSectionExpanded"; "required": false; }; "entitiesSectionExpanded": { "alias": "entitiesSectionExpanded"; "required": false; }; "viewsSectionExpanded": { "alias": "viewsSectionExpanded"; "required": false; }; }, { "entitySelected": "entitySelected"; "toggleCollapse": "toggleCollapse"; "sectionToggled": "sectionToggled"; "openRecord": "openRecord"; "selectRecord": "selectRecord"; "expandAndFocus": "expandAndFocus"; "appGroupToggled": "appGroupToggled"; }, never, never, false, never>;
}
//# sourceMappingURL=navigation-panel.component.d.ts.map