use dioxus::prelude::*;

#[component]
pub fn SeverityBadge(severity: String) -> Element {
    let class = match severity.to_lowercase().as_str() {
        "critical" => "badge badge-critical",
        "high" => "badge badge-high",
        "medium" => "badge badge-medium",
        "low" => "badge badge-low",
        _ => "badge badge-info",
    };

    rsx! {
        span { class: class, "{severity}" }
    }
}
