use leptos::prelude::*;

use crate::theme::Variant;

#[component]
pub fn BadgeClient(children: Children, variant: Variant, class: &'static str) -> impl IntoView {
    let base_classes = "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium";
    let combined_classes = format!("{} {} {}", base_classes, variant.classes(), class);

    view! {
        <span class=combined_classes>
            {children()}
        </span>
    }
}
