import { ComponentSpec } from '@memberjunction/interactive-component-types';
import { UserInfo } from '@memberjunction/core';
import { MJComponentLibraryEntity } from '@memberjunction/core-entities';
import { ComponentObject } from '../types/index.js';
export type ResolutionMode = 'embed' | 'preserve-metadata';
export interface LoadOptions {
    contextUser?: UserInfo;
    forceRefresh?: boolean;
    forceRecompile?: boolean;
    isDependent?: boolean;
    returnType?: 'component' | 'spec' | 'both';
    trackUsage?: boolean;
    defaultNamespace?: string;
    defaultVersion?: string;
    resolutionMode?: ResolutionMode;
    allLibraries?: MJComponentLibraryEntity[];
}
export interface LoadResult {
    success: boolean;
    component?: ComponentObject;
    spec?: ComponentSpec;
    fromCache: boolean;
    errors?: Array<{
        message: string;
        phase: 'fetch' | 'compile' | 'register' | 'dependency';
        componentName?: string;
    }>;
    dependencies?: Record<string, ComponentObject>;
}
export interface HierarchyResult {
    success: boolean;
    rootComponent?: ComponentObject;
    resolvedSpec?: ComponentSpec;
    loadedComponents: string[];
    errors: Array<{
        message: string;
        phase: 'fetch' | 'compile' | 'register' | 'dependency';
        componentName?: string;
    }>;
    components?: Record<string, ComponentObject>;
    stats?: {
        fromCache: number;
        fetched: number;
        compiled: number;
        totalTime: number;
    };
}
export interface ComponentManagerConfig {
    debug?: boolean;
    maxCacheSize?: number;
    cacheTTL?: number;
    enableUsageTracking?: boolean;
    dependencyBatchSize?: number;
    fetchTimeout?: number;
}
export interface CacheEntry {
    spec: ComponentSpec;
    fetchedAt: Date;
    hash?: string;
    usageNotified: boolean;
}
//# sourceMappingURL=types.d.ts.map