use std::collections::HashMap; use crate::void_app::{Element, Props}; use super::user_prefs::UserPrefs; #[derive(PartialEq, Props)] pub struct PoemRequest { pub slug: String, pub user_prefs: UserPrefs, } #[derive(PartialEq, Props)] pub struct TitleProps { pub title: String, pub is_html: bool, pub user_prefs: UserPrefs, } #[derive(PartialEq, Props)] pub struct ContentProps { pub content: String, pub user_prefs: UserPrefs, } #[derive(PartialEq, Props)] pub struct ButtonProps { pub title: String, pub slug: String, pub user_prefs: UserPrefs, pub override_font: Option, } #[derive(PartialEq, Props)] pub struct VoidProps { pub slug: Option, pub poem_database: PoemDatabase, pub user_prefs: UserPrefs, } #[derive(PartialEq, Props, Clone, Debug)] pub struct PoemDatabase { pub poem_list: Vec<(String, String)>, pub poem_hashmap: HashMap, } #[derive(PartialEq, Clone, Debug)] pub struct PoemStruct { pub title: String, pub content: String, pub creation_date: String, } // These next three should all just be one prop. #[derive(Props)] pub struct PoemChildren<'a> { pub children: Element<'a>, } #[derive(Props)] pub struct PageChildren<'a> { pub children: Element<'a>, } #[derive(Props)] pub struct ContentChildren<'a> { pub children: Element<'a>, }