import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Subject } from 'rxjs';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { EntityInfo } from '@memberjunction/core';
import { ResourceData } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
interface EntityNode {
    Name: string;
    ID: string;
    SchemaName: string;
    ReferencedByCount: number;
    DependsOnCount: number;
    IsSelected: boolean;
}
interface RelationshipEdge {
    FromEntity: string;
    ToEntity: string;
    RelatedEntityJoinField: string;
    Type: string;
}
export declare class VersionHistoryGraphResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private cdr;
    IsLoading: boolean;
    AllEntities: EntityNode[];
    FilteredEntities: EntityNode[];
    SearchText: string;
    SchemaFilter: string;
    AvailableSchemas: string[];
    SelectedEntity: EntityNode | null;
    SelectedEntityInfo: EntityInfo | null;
    ReferencedByEntities: RelationshipEdge[];
    DependsOnEntities: RelationshipEdge[];
    TotalEntities: number;
    EntitiesWithDependents: number;
    TotalRelationships: number;
    private static readonly PREFS_KEY;
    private preferencesLoaded;
    private metadata;
    protected destroy$: Subject<void>;
    constructor(cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    LoadData(): void;
    /** Count entities that reference this entity (have FKs pointing to it), excluding self-references */
    private countReferencedBy;
    /** Count entities this entity depends on (has FKs pointing to), excluding self-references */
    private countDependsOn;
    OnSearchChange(text: string): void;
    OnSchemaFilterChange(schema: string): void;
    private loadUserPreferences;
    private persistPreferences;
    private applyFilter;
    SelectEntity(entityNode: EntityNode): void;
    /** Entities that have FKs pointing TO the selected entity (it is the "one" side) */
    private buildReferencedByList;
    /** Entities the selected entity has FKs pointing to (it is the "many" side) */
    private buildDependsOnList;
    NavigateToEntity(entityName: string): void;
    GetDependencyLevel(count: number): string;
    GetSchemaEntityCount(schema: string): number;
    Refresh(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<VersionHistoryGraphResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<VersionHistoryGraphResourceComponent, "mj-version-history-graph-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=graph-resource.component.d.ts.map