use std::env;

/// Runtime kill-switch for the experimental deadpool backend.
///
/// - Missing env var: enabled (`true`)
/// - Values `false|0|no|off` (case-insensitive): disabled
pub fn deadpool_runtime_enabled() -> bool {
    let Ok(value) = env::var("ATHENA_DEADPOOL_ENABLED") else {
        return true;
    };
    match value.trim().to_ascii_lowercase().as_str() {
        "" => true,
        "false" | "0" | "no" | "off" => false,
        _ => true,
    }
}
