use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Axis {
    Row,
    Column,
    Page,
    None,
}

impl std::fmt::Display for Axis {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Axis::Row => write!(f, "Row ↕"),
            Axis::Column => write!(f, "Col ↔"),
            Axis::Page => write!(f, "Page ☰"),
            Axis::None => write!(f, "None ∅"),
        }
    }
}
