use yew::prelude::*; #[derive(Properties, PartialEq)] pub struct Props { pub status: String, } #[function_component(WatchIndicator)] pub fn watch_indicator(props: &Props) -> Html { let (icon, color, title) = match props.status.as_str() { "owned" => ("●", "var(--success)", "Owned"), "partial" => ("◐", "var(--warning)", "Partial"), "wanted" => ("○", "var(--accent)", "Wanted"), "downloading" => ("↓", "var(--accent)", "Downloading"), "fully_watched" => ("●", "var(--accent)", "Fully watched"), "unwatched" => ("○", "var(--text-muted)", "Not watched"), _ => ("○", "var(--text-muted)", "Unknown"), }; html! { { icon } } }