use super::ThemeConfig;
pub fn get_preset(theme_name: &str) -> Option<ThemeConfig> {
match theme_name.to_lowercase().as_str() {
"default" => Some(default_theme()),
"gruvbox" => Some(gruvbox_theme()),
"nord" => Some(nord_theme()),
"tokyonight" => Some(tokyonight_theme()),
"dracula" => Some(dracula_theme()),
"obsidian" => Some(obsidian_theme()),
_ => None,
}
}
fn default_theme() -> ThemeConfig {
ThemeConfig {
selected_color: Some("cyan".to_string()),
directory_color: Some("gray".to_string()),
file_color: Some("white".to_string()),
error_color: Some("gray".to_string()),
highlight_color: Some("yellow".to_string()),
cursor_color: Some("yellow".to_string()),
tree_cursor_color: Some("dim".to_string()),
tree_cursor_bg_color: Some("dim".to_string()),
header_path_color: Some("cyan".to_string()),
header_hints_color: Some("darkgray".to_string()),
}
}
fn gruvbox_theme() -> ThemeConfig {
ThemeConfig {
selected_color: Some("#fe8019".to_string()), directory_color: Some("#83a598".to_string()), file_color: Some("#ebdbb2".to_string()), error_color: Some("#83a598".to_string()), highlight_color: Some("#fabd2f".to_string()), cursor_color: Some("#fabd2f".to_string()), tree_cursor_color: Some("#ebdbb2".to_string()), tree_cursor_bg_color: Some("#303030".to_string()), header_path_color: Some("#fe8019".to_string()), header_hints_color: Some("#928374".to_string()), }
}
fn nord_theme() -> ThemeConfig {
ThemeConfig {
selected_color: Some("#88c0d0".to_string()), directory_color: Some("#81a1c1".to_string()), file_color: Some("#eceff4".to_string()), error_color: Some("#81a1c1".to_string()), highlight_color: Some("#ebcb8b".to_string()), cursor_color: Some("#ebcb8b".to_string()), tree_cursor_color: Some("#eceff4".to_string()), tree_cursor_bg_color: Some("#343a48".to_string()), header_path_color: Some("#88c0d0".to_string()), header_hints_color: Some("#616e88".to_string()), }
}
fn tokyonight_theme() -> ThemeConfig {
ThemeConfig {
selected_color: Some("#7aa2f7".to_string()), directory_color: Some("#7dcfff".to_string()), file_color: Some("#a9b1d6".to_string()), error_color: Some("#7dcfff".to_string()), highlight_color: Some("#e0af68".to_string()), cursor_color: Some("#bb9af7".to_string()), tree_cursor_color: Some("#a9b1d6".to_string()), tree_cursor_bg_color: Some("#1f202e".to_string()), header_path_color: Some("#7aa2f7".to_string()), header_hints_color: Some("#565f89".to_string()), }
}
fn dracula_theme() -> ThemeConfig {
ThemeConfig {
selected_color: Some("#ff79c6".to_string()), directory_color: Some("#8be9fd".to_string()), file_color: Some("#f8f8f2".to_string()), error_color: Some("#8be9fd".to_string()), highlight_color: Some("#f1fa8c".to_string()), cursor_color: Some("#bd93f9".to_string()), tree_cursor_color: Some("#f8f8f2".to_string()), tree_cursor_bg_color: Some("#2d2f3d".to_string()), header_path_color: Some("#ff79c6".to_string()), header_hints_color: Some("#6272a4".to_string()), }
}
fn obsidian_theme() -> ThemeConfig {
ThemeConfig {
selected_color: Some("#a88bfa".to_string()), directory_color: Some("#8b9dff".to_string()), file_color: Some("#dcddde".to_string()), error_color: Some("#8b9dff".to_string()), highlight_color: Some("#c792ea".to_string()), cursor_color: Some("#a88bfa".to_string()), tree_cursor_color: Some("#dcddde".to_string()), tree_cursor_bg_color: Some("#1e1e21".to_string()), header_path_color: Some("#a88bfa".to_string()), header_hints_color: Some("#5a5a5e".to_string()), }
}