/**
 * Default lazy-loaded directive registry
 */
export declare function createDirectiveRegistry(): DirectiveLoaderRegistry;
/**
 * Create a lazy module that loads on first access
 */
export declare function createLazyModule<T>(loader: ModuleLoader<T>): {
  get: () => Promise<T>
  isLoaded: () => boolean
  preload: () => Promise<void>
};
/**
 * Batch load multiple modules with progress callback
 */
export declare function batchLoad<T>(loader: LazyLoader<T>, names: string[], onProgress?: (loaded: number, total: number, name: string) => void): Promise<Map<string, T>>;
/**
 * Global lazy loader instance
 */
export declare const globalLoader: LazyLoader<unknown>;
/**
 * Global directive registry
 */
export declare const directiveRegistry: DirectiveLoaderRegistry;
/**
 * Lazy loader options
 */
export declare interface LazyLoaderOptions {
  preload?: string[]
  timeout?: number
  debug?: boolean
  onError?: (name: string, error: Error) => void
}
/**
 * Directive processor interface
 */
export declare interface DirectiveProcessor {
  process: (content: string, params?: string, context?: Record<string, unknown>) => string | Promise<string>
  name?: string
  hasEndTag?: boolean
}
/**
 * Module loader function
 */
export type ModuleLoader<T = unknown> = () => Promise<T> | T;
/**
 * Module status
 */
export type ModuleStatus = 'pending' | 'loading' | 'loaded' | 'error';
/**
 * Lazy loader for directive processors
 */
export declare class LazyLoader<T = unknown> {
  constructor(options?: LazyLoaderOptions);
  register(name: string, loader: ModuleLoader<T>, dependencies?: string[]): void;
  registerAll(modules: Record<string, ModuleLoader<T>>): void;
  has(name: string): boolean;
  getStatus(name: string): ModuleStatus | null;
  isLoaded(name: string): boolean;
  load(name: string): Promise<T>;
  loadAll(names: string[]): Promise<T[]>;
  loadSync(name: string): T;
  preload(names: string[]): Promise<void>;
  unload(name: string): boolean;
  unloadAll(): void;
  getStats(): {
    registered: number
    loaded: number
    pending: number
    errors: number
    totalLoadTime: number
    modules: Array<{
      name: string
      status: ModuleStatus
      loadCount: number
      loadTime?: number
    }>
  };
}
/**
 * Lazy loader specifically for directive processors
 */
export declare class DirectiveLoaderRegistry {
  constructor(options?: LazyLoaderOptions);
  registerDirective(directiveName: string, moduleName: string, loader: ModuleLoader<DirectiveProcessor | { default: DirectiveProcessor }>): void;
  getProcessor(directiveName: string): Promise<DirectiveProcessor | null>;
  hasDirective(directiveName: string): boolean;
  getDirectiveNames(): string[];
  preloadDirectives(directiveNames: string[]): Promise<void>;
}
