use serde::{Deserialize, Serialize};

pub mod game_preview;
pub mod menu;

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Action<A> {
    pub id: String,
    pub label: String,
    pub action: A,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Toggle<A> {
    pub id: String,
    pub label: String,
    pub value: bool,
    pub action: A,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Field<A> {
    pub id: String,
    pub label: String,
    pub value: Option<String>,
    pub action: A,
}
