1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Theme variant selection enum.
//!
//! The [`ThemeVariant`] enum allows users to explicitly select dark or light
//! theme, or let the system auto-detect based on terminal settings.
/// Theme variant selection.
///
/// Controls which color scheme to use for rendering. The `Auto` variant
/// will attempt to detect the terminal's color scheme, falling back to
/// dark mode if detection is not available.
///
/// # Variants
///
/// * `Dark` - Use dark mode colors (light text on dark background)
/// * `Light` - Use light mode colors (dark text on light background)
/// * `Auto` - Detect from terminal settings (requires `termenv` feature)
///
/// # Example
///
/// ```rust,ignore
/// use ratatui_toolkit::markdown_widget::extensions::theme::{ThemeVariant, get_effective_theme_variant};
///
/// // Explicitly use dark mode
/// let variant = ThemeVariant::Dark;
///
/// // Auto-detect (falls back to dark if detection unavailable)
/// let auto_variant = ThemeVariant::Auto;
/// let effective = get_effective_theme_variant(auto_variant);
/// ```