import { EventEmitter, ChangeDetectorRef } from '@angular/core'; import { MJDashboardPartTypeEntity } from '@memberjunction/core-entities'; import { BaseAngularComponent } from '@memberjunction/ng-base-types'; import { PanelConfig, DashboardPanel } from '../models/dashboard-types'; import * as i0 from "@angular/core"; /** * Result emitted when configuration changes or is validated */ export interface ConfigPanelResult { /** The current panel configuration */ config: PanelConfig; /** Current title */ title: string; /** Current icon */ icon?: string; /** Whether the configuration is valid */ isValid: boolean; /** Validation errors (if any) */ errors: string[]; } /** * Base class for config panels. * Config panels contain ONLY the form content - no dialog chrome (header, footer, buttons). * They communicate with their container via the configChanged output. * * This allows the same panel to be used: * 1. Embedded in the add-panel-dialog (step 2) * 2. Wrapped in a dialog for editing existing panels * * Subclasses are registered with @RegisterClass and instantiated via ClassFactory. */ export declare abstract class BaseConfigPanel extends BaseAngularComponent { protected cdr: ChangeDetectorRef; /** The part type being configured */ partType: MJDashboardPartTypeEntity | null; /** The existing panel (for editing) or null (for creating) */ panel: DashboardPanel | null; /** The initial configuration to populate form fields */ set config(value: PanelConfig | null); get config(): PanelConfig | null; private _config; /** * Emitted when configuration changes. * Container should listen to this to update save button state, etc. */ configChanged: EventEmitter; constructor(cdr: ChangeDetectorRef); /** * Initialize form fields from a configuration. * Called when config input changes. */ abstract initFromConfig(config: PanelConfig | null): void; /** * Build the configuration object from current form values. */ abstract buildConfig(): PanelConfig; /** * Validate the current form values. * @returns Validation result with valid flag and error messages */ validate(): { valid: boolean; errors: string[]; }; /** * Get the current title for the panel. */ abstract getTitle(): string; /** * Get the default title for this part type. */ abstract getDefaultTitle(): string; /** * Get the current icon for the panel. */ getIcon(): string; /** * Get the default icon for this part type. */ getDefaultIcon(): string; /** * Get the current configuration result. * Called by container to get the final config when saving. */ getResult(): ConfigPanelResult; /** * Emit configuration changed event. * Call this whenever form values change. */ protected emitConfigChanged(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } //# sourceMappingURL=base-config-panel.d.ts.map