import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { ComponentSpec } from '@memberjunction/interactive-component-types';
import { ReactComponentEvent, MJReactComponent } from '@memberjunction/ng-react';
import { CompositeKey } from '@memberjunction/core';
import { ComponentStudioStateService, ComponentError } from '../../services/component-studio-state.service';
import * as i0 from "@angular/core";
/**
 * Viewport size preset for the component preview
 */
export type ViewportSize = 'mobile' | 'tablet' | 'desktop';
interface ViewportPreset {
    Size: ViewportSize;
    Label: string;
    Icon: string;
    MaxWidth: string;
}
/**
 * Component Preview - TOP section of CENTER panel.
 * Renders the live React component preview with toolbar controls.
 */
export declare class ComponentPreviewComponent implements OnInit, OnDestroy {
    State: ComponentStudioStateService;
    private cdr;
    ReactComponentRef?: MJReactComponent;
    AskAIToFix: EventEmitter<ComponentError>;
    ActiveViewport: ViewportSize;
    readonly ViewportPresets: ViewportPreset[];
    LocalComponentSpec: ComponentSpec | null;
    private destroy$;
    constructor(State: ComponentStudioStateService, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    RunSelectedComponent(): void;
    StopComponent(): void;
    RefreshComponent(): void;
    SetViewport(size: ViewportSize): void;
    SendErrorToAI(): void;
    GetActivePreset(): ViewportPreset;
    GetPreviewContainerMaxWidth(): string;
    OnComponentEvent(event: ReactComponentEvent): void;
    OnOpenEntityRecord(event: {
        entityName: string;
        key: CompositeKey;
    }): void;
    GetComponentName(): string;
    GetComponentDescription(): string | undefined;
    private syncSpecFromState;
    /**
     * Refresh the preview by nulling the spec, detecting changes,
     * then restoring the spec after a short delay.
     */
    private refreshPreview;
    static ɵfac: i0.ɵɵFactoryDeclaration<ComponentPreviewComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ComponentPreviewComponent, "mj-component-preview", never, {}, { "AskAIToFix": "AskAIToFix"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=component-preview.component.d.ts.map