import { MJComponentLibraryEntity } from '@memberjunction/core-entities';
import { ComponentLibraryDependency, ComponentStyles, ComponentObject } from '@memberjunction/interactive-component-types';
export interface CompiledComponent {
    factory: (context: RuntimeContext, styles?: ComponentStyles, components?: Record<string, any>) => ComponentObject;
    id: string;
    name: string;
    compiledAt: Date;
    warnings?: string[];
    sourceMap?: any;
}
export interface CompileOptions {
    componentName: string;
    componentCode: string;
    styles?: ComponentStyles;
    production?: boolean;
    babelPlugins?: string[];
    babelPresets?: string[];
    libraries?: ComponentLibraryDependency[];
    dependencies?: Array<{
        name: string;
        code?: string;
    }>;
    allLibraries: MJComponentLibraryEntity[];
}
export interface RegistryEntry {
    component: ComponentObject;
    metadata: ComponentMetadata;
    lastAccessed: Date;
    refCount: number;
}
export interface ComponentMetadata {
    id: string;
    name: string;
    version: string;
    namespace: string;
    registeredAt: Date;
    tags?: string[];
}
export interface ComponentError {
    message: string;
    stack?: string;
    componentName: string;
    phase: 'compilation' | 'registration' | 'render' | 'runtime';
    details?: any;
}
export interface ComponentProps {
    data: any;
    userState: any;
    utilities: any;
    callbacks: any;
    components?: Record<string, any>;
    styles?: ComponentStyles;
    onStateChanged?: (stateUpdate: Record<string, any>) => void;
}
export interface CompilerConfig {
    babel: {
        presets: string[];
        plugins: string[];
    };
    minify: boolean;
    sourceMaps: boolean;
    cache: boolean;
    maxCacheSize: number;
    debug?: boolean;
}
export interface RegistryConfig {
    maxComponents: number;
    cleanupInterval: number;
    useLRU: boolean;
    enableNamespaces: boolean;
    debug?: boolean;
}
export interface CompilationResult {
    success: boolean;
    component?: CompiledComponent;
    error?: ComponentError;
    duration: number;
    size?: number;
    loadedLibraries?: Map<string, any>;
}
export interface RuntimeContext {
    React: any;
    ReactDOM?: any;
    libraries?: Record<string, any>;
    utilities?: Record<string, any>;
}
export interface ComponentLifecycle {
    beforeMount?: () => void;
    afterMount?: () => void;
    beforeUpdate?: (prevProps: any, nextProps: any) => void;
    afterUpdate?: (prevProps: any, currentProps: any) => void;
    beforeUnmount?: () => void;
}
export interface ErrorBoundaryOptions {
    onError?: (error: Error, errorInfo: any) => void;
    fallback?: any;
    logErrors?: boolean;
    recovery?: 'retry' | 'reset' | 'none';
}
export * from './library-config.js';
export * from './dependency-types.js';
export { ComponentObject } from '@memberjunction/interactive-component-types';
//# sourceMappingURL=index.d.ts.map