use nalgebra_glm::Vec4;

#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TextAlignment {
    Left,
    Center,
    Right,
}

#[derive(Clone, Copy, Debug, PartialEq)]
pub enum VerticalAlignment {
    Top,
    Middle,
    Bottom,
    Baseline,
}

#[derive(Clone, Debug)]
pub struct TextProperties {
    pub font_size: f32,
    pub color: Vec4,
    pub alignment: TextAlignment,
    pub vertical_alignment: VerticalAlignment,
    pub line_height: f32,
    pub letter_spacing: f32,
    pub outline_width: f32,
    pub outline_color: Vec4,
    pub smoothing: f32,
}

impl Default for TextProperties {
    fn default() -> Self {
        Self {
            font_size: 16.0,
            color: Vec4::new(1.0, 1.0, 1.0, 1.0),
            alignment: TextAlignment::Left,
            vertical_alignment: VerticalAlignment::Baseline,
            line_height: 1.2,
            letter_spacing: 0.0,
            outline_width: 0.0,
            outline_color: Vec4::new(0.0, 0.0, 0.0, 1.0),
            smoothing: 0.01,
        }
    }
}
