import { OnInit, OnDestroy, ChangeDetectorRef, ViewContainerRef, ComponentRef } from '@angular/core';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { MJLeftNavItem, MJLeftNavSection } from '@memberjunction/ng-ui-components';
import * as i0 from "@angular/core";
/** A single sub-section inside an admin container's left-nav. */
export interface AdminSection {
    /** Stable identifier — used in the URL `?section=` deep-link. */
    id: string;
    label: string;
    icon: string;
    description: string;
    source: AdminSectionSource;
}
/**
 * How to resolve and instantiate the component for this sub-section.
 *
 * - `resource`: looks up `@RegisterClass(BaseResourceComponent, driverClass)` and renders it directly.
 * - `dashboard`: looks up the MJ Dashboard record by name, then renders its `DriverClass` via the
 *   BaseDashboard registry with a synthetic `{ dashboard }` config (mirrors the shell's flow for
 *   `ResourceType: "Dashboards"` nav items).
 */
export type AdminSectionSource = {
    kind: 'resource';
    driverClass: string;
} | {
    kind: 'dashboard';
    dashboardName: string;
};
/**
 * Shared base for all Admin app container resources. Subclasses declare:
 *   - ContainerTitle / ContainerIcon / ContainerSubtitle
 *   - Sections[]
 *   - @RegisterClass(BaseResourceComponent, '...')
 *
 * The base handles: left-nav state, URL deep-linking via NavigationService,
 * dynamic component instantiation for both resource and dashboard sections,
 * teardown on switch.
 */
export declare abstract class BaseAdminContainerComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    abstract readonly ContainerTitle: string;
    abstract readonly ContainerIcon: string;
    abstract readonly ContainerSubtitle: string;
    abstract readonly Sections: AdminSection[];
    protected contentHost: ViewContainerRef;
    ActiveSection: string;
    LoadError: string | null;
    IsLoading: boolean;
    /**
     * Cache of section.id → ComponentRef. Once a sub-section is rendered we
     * keep its component alive across switches by detaching + reattaching the
     * view (instead of destroying + recreating). This preserves state — Event
     * Monitor's captured events, GraphQL Console's history, query inputs,
     * scroll position, etc. — and avoids expensive re-init.
     */
    protected cache: Map<string, ComponentRef<unknown>>;
    protected currentSectionId: string | null;
    protected readonly cdr: ChangeDetectorRef;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    GetResourceDisplayName(): Promise<string>;
    GetResourceIconClass(): Promise<string>;
    /**
     * Single-section view of `Sections` shaped for `<mj-left-nav>`. AdminSection
     * already has the required id / label / icon / description fields, so it's
     * structurally compatible with MJLeftNavItem.
     */
    get NavSections(): MJLeftNavSection[];
    /** Adapter from `<mj-left-nav>`'s ItemClicked event back to `selectSection`. */
    OnNavItemClicked(item: MJLeftNavItem): void;
    /** Called by the framework on browser back/forward + deep-link entry. */
    protected OnQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void;
    OnSectionClick(section: AdminSection): Promise<void>;
    private selectSection;
    private renderSection;
    private detachCurrent;
    private createResourceRef;
    private createDashboardRef;
    private findSection;
    static ɵfac: i0.ɵɵFactoryDeclaration<BaseAdminContainerComponent, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<BaseAdminContainerComponent, never, never, {}, {}, never, never, true, never>;
}
//# sourceMappingURL=base-admin-container.component.d.ts.map