use crate Element;
use fmt;
/// A type commonly used for construction of a [wasm-bindgen Closure](https://docs.rs/wasm-bindgen/0.2.67/wasm_bindgen/closure/struct.Closure.html) for use with [DOM Element Event Handlers](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Event_handlers).
/// # Examples
/// In this example ```&self``` is a [tuple struct](https://doc.rust-lang.org/1.9.0/book/structs.html#tuple-structs) which implements [rust_fel::Component](../rust_fel/trait.Component.html)
///```ignore
///fn render(&self) -> rust_fel::Element {
/// let borrow = self.0.borrow_mut();
/// let state = borrow.state.clone();
/// let mut new_clone = self.clone();
///
/// let (theme_onclick, theme_class) = match state.action {
/// Actions::LightMode => (
/// Box::new(move || new_clone.reduce_state(Actions::LightMode))
/// as rust_fel::ClosureProp,
/// "Light-Mode".to_owned(),
/// ),
/// Actions::DarkMode => (
/// Box::new(move || new_clone.reduce_state(Actions::DarkMode))
/// as rust_fel::ClosureProp,
/// "Dark-Mode".to_owned(),
/// ),
/// _ => (Box::new(|| ()) as rust_fel::ClosureProp, "".to_owned()),
/// };
///
/// rust_fel::Element::new(
/// "main".to_owned(),
/// rust_fel::Props {
/// id: Some(borrow.id.clone()),
/// onclick: Some(theme_onclick),
/// class_name: Some(format!("main {}", theme_class)),
/// ..Default::default()
/// },
/// )
/// }
///```
pub type ClosureProp = ;
/// A [struct](https://doc.rust-lang.org/std/keyword.struct.html) holding attributes for a Virtual [DOM](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction) [rust_fel::Element](../rust_fel/struct.Element.html).
/// ```Elements``` can have ```children``` stored inside a [std::vec::Vec](https://doc.rust-lang.org/std/vec/struct.Vec.html).