import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData, MJDashboardEntity, MJDashboardCategoryEntity, MJDashboardPartTypeEntity, DashboardUserPermissions } from '@memberjunction/core-entities';
import { ShareDialogResult } from './dashboard-share-dialog.component';
import { DashboardViewerComponent, DashboardNavRequestEvent, PanelInteractionEvent, AddPanelResult, DashboardPanel, EditPartDialogResult, DashboardOpenEvent, DashboardEditEvent, DashboardDeleteEvent, DashboardMoveEvent, DashboardCreateEvent, CategoryCreateEvent, CategoryDeleteEvent, CategoryChangeEvent, ViewPreferenceChangeEvent, DashboardBrowserViewMode, BreadcrumbNavigateEvent } from '@memberjunction/ng-dashboard-viewer';
import * as i0 from "@angular/core";
/**
 * Mode for the dashboard browser
 */
type BrowserMode = 'list' | 'view' | 'edit';
/**
 * Resource component for browsing, creating, and editing dashboards.
 * Uses the generic DashboardBrowserComponent for list mode and handles
 * view/edit mode internally with routing integration.
 */
export declare class DashboardBrowserResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private cdr;
    private route;
    mode: BrowserMode;
    isLoading: boolean;
    dashboards: MJDashboardEntity[];
    categories: MJDashboardCategoryEntity[];
    selectedDashboard: MJDashboardEntity | null;
    selectedCategoryId: string | null;
    viewMode: DashboardBrowserViewMode;
    showAddPanelDialog: boolean;
    showConfigDialog: boolean;
    configDialogPanel: DashboardPanel | null;
    configDialogPartType: MJDashboardPartTypeEntity | null;
    configDialogClass: string;
    showConfirmDialog: boolean;
    confirmPanelId: string;
    confirmPanelTitle: string;
    showShareDialog: boolean;
    editingName: string;
    editingDescription: string;
    private originalName;
    private originalDescription;
    private originalConfig;
    selectedDashboardPermissions: DashboardUserPermissions;
    dashboardPermissionsMap: Map<string, DashboardUserPermissions>;
    effectiveCategoryMap: Map<string, string | null>;
    private readonly _destroy$;
    dashboardViewer: DashboardViewerComponent;
    constructor(cdr: ChangeDetectorRef, route: ActivatedRoute);
    ngOnInit(): void;
    ngOnDestroy(): void;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    /**
     * Handle dashboard open request from generic browser
     */
    onDashboardOpen(event: DashboardOpenEvent): void;
    /**
     * Open the current dashboard in its own dedicated Explorer tab
     */
    openInNewTab(): void;
    /**
     * Handle dashboard edit request from generic browser
     */
    onDashboardEdit(event: DashboardEditEvent): void;
    /**
     * Handle dashboard delete request from generic browser
     */
    onDashboardDelete(event: DashboardDeleteEvent): Promise<void>;
    /**
     * Handle dashboard move request from generic browser.
     * For owned dashboards: updates the dashboard's CategoryID directly.
     * For shared dashboards: creates/updates a DashboardCategoryLink to organize without modifying the original.
     */
    onDashboardMove(event: DashboardMoveEvent): Promise<void>;
    /**
     * Handle create dashboard request from generic browser
     */
    onDashboardCreate(event: DashboardCreateEvent): Promise<void>;
    /**
     * Handle category change from generic browser - update URL
     */
    onCategoryChange(event: CategoryChangeEvent): void;
    /**
     * Handle view preference change from generic browser - persist
     */
    onViewPreferenceChange(event: ViewPreferenceChangeEvent): void;
    /**
     * Handle category create request from generic browser
     * Includes extensive logging for debugging category creation issues
     */
    onCategoryCreate(event: CategoryCreateEvent): Promise<void>;
    /**
     * Handle category delete request from generic browser
     * Performs recursive deletion of category and all children
     */
    onCategoryDelete(event: CategoryDeleteEvent): Promise<void>;
    /**
     * Handle breadcrumb navigation event
     * Navigates back to list view with optional category selection
     */
    onBreadcrumbNavigate(event: BreadcrumbNavigateEvent): void;
    /**
     * Open a dashboard for viewing
     */
    openDashboard(dashboard: MJDashboardEntity): void;
    /**
     * Open a dashboard for editing
     */
    editDashboard(dashboard: MJDashboardEntity): void;
    /**
     * Go back to list view
     */
    backToList(): void;
    /**
     * Toggle edit mode for current dashboard
     */
    toggleEditMode(): void;
    /**
     * Open the share dialog for the current dashboard
     */
    openShareDialog(): void;
    /**
     * Close the share dialog
     */
    closeShareDialog(): void;
    /**
     * Handle share dialog result
     */
    onShareDialogResult(result: ShareDialogResult): void;
    /**
     * Create a new dashboard
     */
    createDashboard(categoryId?: string | null): Promise<void>;
    /**
     * Save the current dashboard
     */
    saveDashboard(): Promise<void>;
    /**
     * Cancel editing and revert changes
     */
    cancelEdit(): void;
    /**
     * Handle name input blur - validate name is not empty
     */
    onNameBlur(): void;
    /**
     * Open the Add Part dialog
     */
    openAddPartDialog(): void;
    /**
     * Handle panel interaction events from the viewer
     */
    onPanelInteraction(event: PanelInteractionEvent): void;
    /**
     * Handle navigation events from panels
     */
    onNavigationRequested(event: DashboardNavRequestEvent): void;
    /**
     * Resolve an application name to its ID
     */
    private resolveAppId;
    /**
     * Handle add panel dialog result
     */
    onPanelAdded(result: AddPanelResult): void;
    /**
     * Handle add panel dialog cancel
     */
    onAddPanelCancelled(): void;
    /**
     * Open the config dialog for a panel
     */
    openConfigDialog(panelId: string): void;
    /**
     * Handle config dialog save
     */
    onConfigDialogSaved(result: EditPartDialogResult): void;
    /**
     * Handle config dialog cancel
     */
    onConfigDialogCancelled(): void;
    /**
     * Close the config dialog
     */
    private closeConfigDialog;
    /**
     * Open the remove confirmation dialog
     */
    openRemoveConfirmDialog(panelId: string, panelTitle: string): void;
    /**
     * Handle remove confirmation
     */
    onRemoveConfirmed(): void;
    /**
     * Handle remove cancel
     */
    onRemoveCancelled(): void;
    /**
     * Close the remove confirm dialog
     */
    private closeRemoveConfirmDialog;
    private loadDashboards;
    /**
     * Apply initial state from resource configuration (handles pin navigation
     * and other deep-link scenarios where ActivatedRoute may not fire).
     */
    private applyConfigurationState;
    /**
     * Check for late-arriving query params (e.g., from pin navigation where
     * UpdateActiveTabQueryParams runs after the component has already loaded).
     * Polls briefly for queryParams to appear in the URL.
     */
    private watchForLateQueryParams;
    private subscribeToQueryParams;
    /**
     * Update the URL query params for the current tab.
     * Uses NavigationService to update the tab configuration, which triggers
     * the shell's URL sync mechanism to update the browser URL properly
     * while respecting app-scoped routes.
     */
    private updateUrlQueryParams;
    /**
     * Get all child categories of a parent category recursively
     */
    private getChildCategoriesRecursive;
    private loadViewPreference;
    private saveViewPreference;
    static ɵfac: i0.ɵɵFactoryDeclaration<DashboardBrowserResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DashboardBrowserResourceComponent, "mj-dashboard-browser-resource", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=dashboard-browser-resource.component.d.ts.map