#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MemoryBackendKind {
    Sqlite,
    Markdown,
    None,
    Unknown,
}

pub fn classify_memory_backend(name: &str) -> MemoryBackendKind {
    match name.trim().to_ascii_lowercase().as_str() {
        "sqlite" => MemoryBackendKind::Sqlite,
        "markdown" | "md" => MemoryBackendKind::Markdown,
        "none" | "noop" => MemoryBackendKind::None,
        _ => MemoryBackendKind::Unknown,
    }
}

pub fn default_memory_backend_key() -> &'static str {
    "sqlite"
}
