use allocative::Allocative;

#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Allocative)]
pub enum UTXOCohortId {
    #[default]
    UpTo1d,
    UpTo1w,
    UpTo1m,
    UpTo2m,
    UpTo3m,
    UpTo4m,
    UpTo5m,
    UpTo6m,
    UpTo1y,
    UpTo2y,
    UpTo3y,
    UpTo5y,
    UpTo7y,
    UpTo10y,
    UpTo15y,

    From1dTo1w,
    From1wTo1m,
    From1mTo3m,
    From3mTo6m,
    From6mTo1y,
    From1yTo2y,
    From2yTo3y,
    From3yTo5y,
    From5yTo7y,
    From7yTo10y,
    From10yTo15y,

    From1y,
    From2y,
    From4y,
    From10y,
    From15y,

    Year2009,
    Year2010,
    Year2011,
    Year2012,
    Year2013,
    Year2014,
    Year2015,
    Year2016,
    Year2017,
    Year2018,
    Year2019,
    Year2020,
    Year2021,
    Year2022,
    Year2023,
    Year2024,

    ShortTermHolders,
    LongTermHolders,
}

impl UTXOCohortId {
    pub fn name(&self) -> &str {
        match self {
            Self::UpTo1d => "up_to_1d",
            Self::UpTo1w => "up_to_1w",
            Self::UpTo1m => "up_to_1m",
            Self::UpTo2m => "up_to_2m",
            Self::UpTo3m => "up_to_3m",
            Self::UpTo4m => "up_to_4m",
            Self::UpTo5m => "up_to_5m",
            Self::UpTo6m => "up_to_6m",
            Self::UpTo1y => "up_to_1y",
            Self::UpTo2y => "up_to_2y",
            Self::UpTo3y => "up_to_3y",
            Self::UpTo5y => "up_to_5y",
            Self::UpTo7y => "up_to_7y",
            Self::UpTo10y => "up_to_10y",
            Self::UpTo15y => "up_to_15y",

            Self::From1dTo1w => "from_1d_to_1w",
            Self::From1wTo1m => "from_1w_to_1m",
            Self::From1mTo3m => "from_1m_to_3m",
            Self::From3mTo6m => "from_3m_to_6m",
            Self::From6mTo1y => "from_6m_to_1y",
            Self::From1yTo2y => "from_1y_to_2y",
            Self::From2yTo3y => "from_2y_to_3y",
            Self::From3yTo5y => "from_3y_to_5y",
            Self::From5yTo7y => "from_5y_to_7y",
            Self::From7yTo10y => "from_7y_to_10y",
            Self::From10yTo15y => "from_10y_to_15y",

            Self::From1y => "from_1y",
            Self::From2y => "from_2y",
            Self::From4y => "from_4y",
            Self::From10y => "from_10y",
            Self::From15y => "from_15y",

            Self::Year2009 => "year_2009",
            Self::Year2010 => "year_2010",
            Self::Year2011 => "year_2011",
            Self::Year2012 => "year_2012",
            Self::Year2013 => "year_2013",
            Self::Year2014 => "year_2014",
            Self::Year2015 => "year_2015",
            Self::Year2016 => "year_2016",
            Self::Year2017 => "year_2017",
            Self::Year2018 => "year_2018",
            Self::Year2019 => "year_2019",
            Self::Year2020 => "year_2020",
            Self::Year2021 => "year_2021",
            Self::Year2022 => "year_2022",
            Self::Year2023 => "year_2023",
            Self::Year2024 => "year_2024",

            Self::ShortTermHolders => "sth",
            Self::LongTermHolders => "lth",
        }
    }
}
