/**
 * Configuration Loader
 *
 * Loads and parses configurations with support for:
 * - Single-environment configs
 * - Multi-environment setups
 * - Environment selection
 */
import type { Flow } from '@walkeros/core';
import type { BuildOptions } from '../types/bundle.js';
/**
 * Result of configuration loading.
 */
export interface LoadConfigResult {
    /** Runtime event processing configuration */
    flowConfig: Flow.Config;
    /** Build-time configuration */
    buildOptions: BuildOptions;
    /** Name of the selected environment (or 'default' for single configs) */
    environment: string;
    /** Whether this is a multi-environment setup */
    isMultiEnvironment: boolean;
    /** All available environment names (for multi-environment setups) */
    availableEnvironments?: string[];
}
/**
 * Options for loading configuration.
 */
export interface LoadConfigOptions {
    /** Path to config file */
    configPath: string;
    /** Environment name to load (for multi-environment configs) */
    environment?: string;
    /** Logger for warnings */
    logger?: {
        warn: (message: string) => void;
        info: (message: string) => void;
    };
}
/**
 * Load and parse bundle configuration.
 *
 * @remarks
 * Automatically detects whether the config is:
 * - New format: { flow: {...}, build: {...} }
 * - Multi-environment format: { version: 1, environments: {...} }
 * - Legacy format: { platform, sources, destinations, packages, ... } (with deprecation warning)
 *
 * For multi-environment configs, requires `environment` option.
 *
 * @param rawConfig - Raw configuration object from JSON file
 * @param options - Loading options
 * @returns Parsed configuration with flow and build separated
 */
export declare function loadBundleConfig(rawConfig: unknown, options: LoadConfigOptions): LoadConfigResult;
/**
 * Load all environments from a multi-environment configuration.
 *
 * @remarks
 * Used by the --all flag to build all environments.
 *
 * @param rawConfig - Raw configuration object
 * @param options - Loading options
 * @returns Array of loaded configurations for all environments
 */
export declare function loadAllEnvironments(rawConfig: unknown, options: Omit<LoadConfigOptions, 'environment'>): LoadConfigResult[];
/**
 * Get list of available environments from configuration.
 *
 * @param rawConfig - Raw configuration object
 * @returns Array of environment names, or empty array for single-environment configs
 */
export declare function getAvailableEnvironments(rawConfig: unknown): string[];
//# sourceMappingURL=loader.d.ts.map