use serde::{Deserialize, Serialize};

use super::dim::{Radius, Spacing};

#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SpacingScale {
    pub xs: Spacing,
    pub sm: Spacing,
    pub md: Spacing,
    pub lg: Spacing,
    pub xl: Spacing,
    pub xxl: Spacing,
}

impl SpacingScale {
    pub const STANDARD: Self = Self {
        xs: Spacing::px(4.0),
        sm: Spacing::px(8.0),
        md: Spacing::px(12.0),
        lg: Spacing::px(16.0),
        xl: Spacing::px(24.0),
        xxl: Spacing::px(32.0),
    };
}

#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RadiusScale {
    pub none: Radius,
    pub sm: Radius,
    pub md: Radius,
    pub lg: Radius,
    pub pill: Radius,
}

impl RadiusScale {
    pub const STANDARD: Self = Self {
        none: Radius::px(0.0),
        sm: Radius::px(2.0),
        md: Radius::px(4.0),
        lg: Radius::px(8.0),
        pill: Radius::px(9999.0),
    };
}
