//! User configuration loading and management.
//!
//! This module handles mi6 configuration:
//! - [`Config`]: Main application configuration (hooks, history, TUI)
//! - [`TuiConfig`]: TUI-specific configuration (columns, theme, animations)
//! - [`HooksConfig`]: Hook event enablement configuration
//! - [`StorageConfig`]: Runtime storage behavior configuration
//! - [`generate_otel_env`]: OpenTelemetry environment configuration
//! - [`parse_history`]: TTL/history string parsing
//! - [`dir`]: Centralized directory path management
//!
//! Both core and TUI settings are stored in a single `config.toml` file.

mod app;
pub mod dir;
mod history;
mod hooks;
mod otel;
mod storage;
pub mod tui;

pub use app::{Config, ConfigSource};
pub use dir::{
    EXAMPLE_THEME_FILENAME, EXAMPLE_THEME_NAME, core_config_path, db_path, ensure_initialized,
    mi6_dir, themes_dir,
};
pub use history::{DEFAULT_HISTORY, parse_history};
pub use hooks::HooksConfig;
pub use otel::{DEFAULT_OTEL_PORT, OTEL_ENV_KEYS, OtelConfig, OtelMode, generate_otel_env};
pub use storage::StorageConfig;
pub use tui::{CURRENT_TUI_CONFIG_VERSION, TuiColumnProfile, TuiConfig, TuiSortSpec};

// Re-export errors from model/error for backward compatibility
pub use crate::model::error::{ConfigError, TtlParseError};
