/**
 * Configuration Loader
 *
 * Handles loading, saving, and merging configuration files
 */
import { type FeaturesConfig, type PluginatorConfig } from '../core/types/config.js';
import type { Plugin } from '../core/types/plugin.js';
import type { SourceConfig } from '../core/types/source.js';
import { type ThemeColorsInput } from './defaults.js';
/**
 * Configuration loading result
 */
export interface ConfigLoadResult<T> {
    success: boolean;
    data: T;
    errors?: string[];
    source: 'file' | 'default' | 'merged';
}
/**
 * Load the main app config
 */
export declare function loadConfig(configPath?: string): Promise<ConfigLoadResult<PluginatorConfig>>;
/**
 * Save the main app config with proper formatting and section headers
 */
export declare function saveConfig(config: PluginatorConfig, configPath?: string): Promise<void>;
/**
 * Load plugins config
 */
export declare function loadPlugins(pluginsPath?: string): Promise<ConfigLoadResult<Plugin[]>>;
/**
 * Load all plugins from both prod and test files
 */
export declare function loadAllPlugins(): Promise<ConfigLoadResult<Plugin[]>>;
/**
 * Ensure the data directory exists
 */
export declare function ensureDataDirectory(): Promise<void>;
/**
 * Save plugins config
 */
export declare function savePlugins(plugins: Plugin[], pluginsPath?: string): Promise<void>;
/**
 * Update the enabled state of plugins across ALL plugin files.
 * Only modifies the `enabled` field — preserves each file's source types and other data.
 */
export declare function updatePluginEnabledStates(updates: Map<string, boolean>): Promise<void>;
/**
 * Load sources config
 */
export declare function loadSources(sourcesPath?: string): Promise<ConfigLoadResult<SourceConfig[]>>;
/**
 * Save sources config
 */
export declare function saveSources(sources: SourceConfig[], sourcesPath?: string): Promise<void>;
/**
 * Load theme configuration
 *
 * Note: Custom theme files are no longer supported as of v1.15.0.
 * This function now always returns the default theme colors.
 * Use bundled theme presets via ThemeProvider instead.
 */
export declare function loadTheme(): Promise<ConfigLoadResult<ThemeColorsInput>>;
/**
 * Load features configuration (v2.0.1 - Plan 12)
 * Loads from ~/.pluginator/features.json, merges with defaults
 */
export declare function loadFeatures(featuresPath?: string): Promise<ConfigLoadResult<FeaturesConfig>>;
/**
 * Save features configuration (v2.0.1 - Plan 12)
 */
export declare function saveFeatures(features: FeaturesConfig, featuresPath?: string): Promise<void>;
/**
 * Initialize config files with defaults
 * Creates config and sources in ~/.pluginator/ if they don't exist
 */
export declare function initializeConfig(): Promise<void>;
/**
 * Initialize all required data files after setup wizard completion
 */
export declare function initializeDataFiles(options: {
    prodPlugins?: Plugin[];
    testPlugins?: Plugin[];
    config?: PluginatorConfig;
}): Promise<void>;
/**
 * Configuration manager class for centralized access
 */
export declare class ConfigManager {
    private config;
    private plugins;
    private sources;
    private theme;
    private features;
    private loaded;
    /**
     * Load all config files
     */
    load(): Promise<void>;
    /**
     * Get the main config
     */
    getConfig(): PluginatorConfig;
    /**
     * Get plugins list
     */
    getPlugins(): Plugin[];
    /**
     * Get sources list
     */
    getSources(): SourceConfig[];
    /**
     * Get theme colors
     */
    getTheme(): ThemeColorsInput;
    /**
     * Get features config (v2.0.1 - Plan 12)
     */
    getFeatures(): FeaturesConfig;
    /**
     * Check if loaded
     */
    isLoaded(): boolean;
    /**
     * Update config value
     */
    setConfigValue<K extends keyof PluginatorConfig>(key: K, value: PluginatorConfig[K]): void;
    /**
     * Update features config (v2.0.1 - Plan 12)
     */
    setFeatures(features: Partial<FeaturesConfig>): void;
    /**
     * Save all config files
     */
    save(): Promise<void>;
}
/**
 * Get or create the global config manager
 */
export declare function getConfigManager(): ConfigManager;
//# sourceMappingURL=loader.d.ts.map