use crate::{Yazi, keymap::Keymap, theme::Theme}; pub(crate) struct Preset; impl Preset { pub(super) fn yazi() -> Result { toml::from_str(&yazi_macro::config_preset!("yazi")) } pub(super) fn keymap() -> Result { toml::from_str(&yazi_macro::config_preset!("keymap")) } pub(super) fn theme(light: bool) -> Result { toml::from_str(&if light { yazi_macro::theme_preset!("light") } else { yazi_macro::theme_preset!("dark") }) } #[inline] pub(crate) fn mix(a: A, b: B, c: C) -> impl Iterator where A: IntoIterator, B: IntoIterator, C: IntoIterator, { a.into_iter().chain(b).chain(c) } }