Skip to main content

sunday_slate/injuries/
mod.rs

1use nfl_data::InjuryDesignation;
2
3pub struct InjuryChip {
4    pub code: &'static str,
5    pub title: &'static str,
6    pub class: &'static str,
7}
8
9pub fn chip(designation: InjuryDesignation) -> InjuryChip {
10    match designation {
11        InjuryDesignation::Questionable => InjuryChip {
12            code: "Q",
13            title: "Questionable",
14            class: "badge-warning badge-outline badge-xs",
15        },
16        InjuryDesignation::Doubtful => InjuryChip {
17            code: "D",
18            title: "Doubtful",
19            class: "badge-error badge-xs",
20        },
21        InjuryDesignation::Out => InjuryChip {
22            code: "O",
23            title: "Out",
24            class: "badge-error badge-xs",
25        },
26        InjuryDesignation::InjuredReserve => InjuryChip {
27            code: "IR",
28            title: "Injured Reserve",
29            class: "badge-error badge-xs",
30        },
31    }
32}