use super::*;
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlRoot {
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) children: Vec<HtmlNode>,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlFor {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) is_reactive: bool,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) pattern: proc_macro2::TokenStream,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) iterable: Expr,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) body: Vec<HtmlNode>,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlIf {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) is_reactive: bool,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) branches: Vec<(Option<Expr>, Vec<HtmlNode>, bool)>,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlAttrIf {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) is_inline: bool,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) branches: Vec<(Option<Expr>, Expr, bool)>,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) else_default: proc_macro2::TokenStream,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlAttrMatch {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) is_inline: bool,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) scrutinee: Expr,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) arms: Vec<(proc_macro2::TokenStream, Expr)>,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlMatch {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) is_reactive: bool,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) scrutinee: Expr,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) arms: Vec<(proc_macro2::TokenStream, Vec<HtmlNode>)>,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlElement {
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) tag: Ident,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) tag_name: String,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) is_ident_tag: bool,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) attributes: HtmlAttrs,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) children: Vec<HtmlNode>,
}
#[derive(Clone, Data, Debug, New)]
pub(crate) struct HtmlDynamicTag {
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) tag_expr: Expr,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) attributes: HtmlAttrs,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) children: Vec<HtmlNode>,
}
#[derive(Clone, Data, Debug, New, serde::Deserialize, serde::Serialize)]
pub(crate) struct ComponentInfo {
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) props_type: String,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) props_fields: Vec<String>,
#[get(pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) props_field_types: HashMap<String, String>,
}
#[derive(Clone, Copy, Data, Debug, New)]
pub(crate) struct AttrIfContext<'a> {
#[get(pub(crate))]
pub(crate) html_attr_if: &'a HtmlAttrIf,
#[get(pub(crate))]
pub(crate) else_default: &'a proc_macro2::TokenStream,
#[get(pub(crate), type(copy))]
pub(crate) mode: AttrIfMode,
}
#[derive(Clone, Copy, Data, Debug, New)]
pub(crate) struct AttrValueContext<'a> {
#[get(pub(crate))]
pub(crate) value: &'a HtmlAttrValue,
#[get(pub(crate))]
pub(crate) key_str: &'a str,
#[get(pub(crate), type(copy))]
pub(crate) is_component: bool,
}
#[derive(Clone, Copy, Data, Debug, New)]
pub(crate) struct AttrEntryContext<'a> {
#[get(pub(crate))]
pub(crate) value: &'a HtmlAttrValue,
#[get(pub(crate))]
pub(crate) key_str: &'a str,
}