/**
 * Component Loader
 *
 * Loads and registers Hypen components from file system.
 * Works in both Node.js and Bun environments.
 */
import type { HypenModuleDefinition } from "./app.js";
export interface ComponentDefinition {
    name: string;
    module: HypenModuleDefinition<any>;
    template: string;
    path: string;
}
export declare class ComponentLoader {
    private components;
    /**
     * Register a component with its module and template
     */
    register(name: string, module: HypenModuleDefinition<any>, template: string, path?: string): void;
    /**
     * Get a registered component by name
     */
    get(name: string): ComponentDefinition | undefined;
    /**
     * Check if a component is registered
     */
    has(name: string): boolean;
    /**
     * Get all registered component names
     */
    getNames(): string[];
    /**
     * Get all registered components
     */
    getAll(): ComponentDefinition[];
    /**
     * Clear all registered components
     */
    clear(): void;
    /**
     * Load a component from a directory
     * Expects: component.ts and component.hypen in the same directory
     */
    loadFromDirectory(name: string, dirPath: string): Promise<void>;
    /**
     * Auto-load all components from a directory
     * Scans for subdirectories containing component.ts and component.hypen
     */
    loadFromComponentsDir(baseDir: string): Promise<void>;
}
export declare const componentLoader: ComponentLoader;
