use super::{ComponentState, LayoutDirection};
use crate::{
platform::prelude::*,
settings::{Color, Font, Gradient},
};
use serde::{Deserialize, Serialize};
#[derive(Default, Serialize, Deserialize)]
pub struct LayoutState {
pub components: Vec<ComponentState>,
pub direction: LayoutDirection,
pub timer_font: Option<Font>,
pub times_font: Option<Font>,
pub text_font: Option<Font>,
pub background: Gradient,
pub thin_separators_color: Color,
pub separators_color: Color,
pub text_color: Color,
}
#[cfg(feature = "std")]
impl LayoutState {
pub fn write_json<W>(&self, writer: W) -> serde_json::Result<()>
where
W: std::io::Write,
{
serde_json::to_writer(writer, self)
}
}