import { EventEmitter, ChangeDetectorRef, ViewContainerRef, AfterViewInit, OnDestroy } from '@angular/core'; import { MJDashboardPartTypeEntity } from '@memberjunction/core-entities'; import { PanelConfig } from '../../models/dashboard-types'; import { ConfigPanelResult } from '../../config-panels/base-config-panel'; import * as i0 from "@angular/core"; /** * Result when a panel is added */ export interface AddPanelResult { PartType: MJDashboardPartTypeEntity; Config: PanelConfig; Title: string; Icon?: string; } /** * Dialog step type */ type DialogStep = 'select-type' | 'configure'; /** * Dialog for adding a new part to the dashboard. * Two-step flow: first select the part type, then configure using dynamically loaded config panels. * * Config panels are loaded via ClassFactory using DashboardPartType.ConfigDialogClass, * allowing new part types to be added without modifying this component. */ export declare class AddPanelDialogComponent implements AfterViewInit, OnDestroy { private readonly cdr; /** Available part types to choose from */ partTypes: MJDashboardPartTypeEntity[]; /** Whether the dialog is visible */ set visible(value: boolean); get visible(): boolean; private _visible; /** Emitted when a part is configured and ready to add */ panelAdded: EventEmitter; /** Emitted when the dialog is cancelled */ cancelled: EventEmitter; configPanelContainer: ViewContainerRef; step: DialogStep; selectedPartType: MJDashboardPartTypeEntity | null; /** Current config panel result (updated via configChanged event) */ currentResult: ConfigPanelResult | null; /** Whether the Add Part button should be enabled */ canAddPart: boolean; /** Reference to dynamically created config panel */ private configPanelRef; /** Whether the view has been initialized */ private viewInitialized; /** Error loading the config panel */ loadError: string | null; /** Whether config panel is loading */ isLoadingPanel: boolean; constructor(cdr: ChangeDetectorRef); ngAfterViewInit(): void; ngOnDestroy(): void; /** * Reset the dialog to initial state */ reset(): void; /** * Select a part type and go to configuration step */ onPartTypeSelect(partType: MJDashboardPartTypeEntity): void; /** * Go back to type selection */ goBack(): void; /** * Handle config changes from embedded config panel */ onConfigChanged(result: ConfigPanelResult): void; /** * Add the configured part */ addPart(): void; /** * Cancel the dialog */ onCancel(): void; /** * Get the configuration type name */ getConfigTypeName(): string; /** * Check if the selected part type has a config panel class */ hasConfigPanel(): boolean; /** * Dynamically load the config panel component */ private loadConfigPanel; /** * Destroy the dynamically created config panel */ private destroyConfigPanel; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {}; //# sourceMappingURL=add-panel-dialog.component.d.ts.map