import { AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef } from '@angular/core';
import { BaseDashboard } from '@memberjunction/ng-shared';
import { ResourceData } from '@memberjunction/core-entities';
import { ComponentSpec } from '@memberjunction/interactive-component-types';
import { ArtifactSelectionResult } from './components/artifact-selection-dialog.component';
import { ArtifactLoadResult } from './components/artifact-load-dialog.component';
import { MJNotificationService } from '@memberjunction/ng-notifications';
import { ComponentStudioStateService, ComponentError } from './services/component-studio-state.service';
import { ComponentVersionService } from './services/component-version.service';
import { SaveVersionResult } from './components/save-version-dialog/save-version-dialog.component';
import * as i0 from "@angular/core";
/**
 * Result from the New Component dialog.
 */
export interface NewComponentResult {
    name: string;
    title: string;
    description: string;
    type: string;
}
export declare class ComponentStudioDashboardComponent extends BaseDashboard implements AfterViewInit, OnDestroy {
    state: ComponentStudioStateService;
    versionService: ComponentVersionService;
    private cdr;
    private notificationService;
    private static readonly USER_PREFS_KEY;
    leftPanelWidth: number;
    rightPanelWidth: number;
    previewFlex: string;
    editorFlex: string;
    private previewFlexPercent;
    exportDropdownOpen: boolean;
    IsResizing: boolean;
    private resizeType;
    private resizeStartX;
    private resizeStartValue;
    IsLeftPanelCollapsed: boolean;
    IsEditorPanelCollapsed: boolean;
    ShowNewComponentDialog: boolean;
    ShowKeyboardShortcuts: boolean;
    ShowSaveVersionDialog: boolean;
    ShowTextImportDialog: boolean;
    ShowArtifactLoadDialog: boolean;
    ShowArtifactSelectionDialog: boolean;
    LastSavedTime: Date | null;
    private prefsLoaded;
    fileInput?: ElementRef<HTMLInputElement>;
    private destroy$;
    private metadata;
    constructor(state: ComponentStudioStateService, versionService: ComponentVersionService, cdr: ChangeDetectorRef, notificationService: MJNotificationService);
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    ngAfterViewInit(): Promise<void>;
    ngOnDestroy(): void;
    protected initDashboard(): void;
    protected loadData(): void;
    private loadUserPreferences;
    private applyPreferences;
    private getCurrentPreferences;
    private saveUserPreferences;
    private saveUserPreferencesDebounced;
    OnKeyDown(event: KeyboardEvent): void;
    SaveVersion(): void;
    OnSaveVersionConfirm(result: SaveVersionResult): Promise<void>;
    RefreshComponent(): void;
    ToggleAIPanel(): void;
    ToggleLeftPanel(): void;
    ToggleEditorPanel(): void;
    OnAskAIToFix(error: ComponentError): void;
    OnNewComponent(): void;
    OnNewComponentDialogClose(result: NewComponentResult | null): void;
    OnQuickStart(type: string): void;
    private createComponentFromResult;
    private getTemplateCode;
    ToggleExportDropdown(): void;
    OnDocumentClick(event: MouseEvent): void;
    ImportFromFile(): void;
    ImportFromText(): void;
    OnTextImportSpec(spec: ComponentSpec): void;
    OnTextImportCancel(): void;
    ImportFromArtifact(): void;
    OnArtifactLoadClose(result: ArtifactLoadResult | undefined): void;
    HandleFileSelect(event: Event): Promise<void>;
    private handleSpecImport;
    ExportToArtifact(): void;
    OnArtifactSelectionClose(result: ArtifactSelectionResult | undefined): Promise<void>;
    ExportToFile(): void;
    ExportToClipboard(): Promise<void>;
    RefreshData(): Promise<void>;
    OnLeftResizeStart(event: MouseEvent): void;
    OnRightResizeStart(event: MouseEvent): void;
    OnCenterResizeStart(event: MouseEvent): void;
    private addResizeListeners;
    private onResizeMove;
    private onResizeEnd;
    private readFile;
    private generateSHA256Hash;
    static ɵfac: i0.ɵɵFactoryDeclaration<ComponentStudioDashboardComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ComponentStudioDashboardComponent, "mj-component-studio-dashboard", never, {}, {}, never, never, false, never>;
}
//# sourceMappingURL=component-studio-dashboard.component.d.ts.map