#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum Edition {
    Original,
    Edition2027Pre,
}

impl Edition {
    pub fn parse(s: &str) -> Option<Self> {
        match s {
            "original" => Some(Edition::Original),
            "2027-pre" => Some(Edition::Edition2027Pre),
            _ => None,
        }
    }

    pub fn supported() -> Vec<&'static str> {
        vec!["original", "2027-pre"]
    }

    pub fn as_str(&self) -> &str {
        match self {
            Edition::Original => "original",
            Edition::Edition2027Pre => "2027-pre",
        }
    }
}
