///|
/// Determines how `` tags are rendered.
pub(all) enum ATagMode {
Link
Node
}
///|
/// Configuration for HTML-to-rabbita conversion.
///
/// - `module_prefix`: Prepended to all generated function names (e.g. "@html.").
/// - `indent`: Indent string for pretty-printing; `None` produces single-line output.
/// - `a_tag_mode`: How to handle `` tags — `Link` uses `@html.a(...)`, `Node` uses `@html.node("a", ...)`.
/// - `convert_comments`: Whether to preserve HTML comments as MoonBit comments.
/// - `use_named_functions`: Whether to use named rabbita functions (e.g. `@html.div`) instead of `@html.node("div", ...)`.
/// - `use_reverse_pipe`: Whether to use the reverse pipe operator `<|` for passing children.
pub(all) struct Config {
module_prefix : String
indent : String?
a_tag_mode : ATagMode
convert_comments : Bool
use_named_functions : Bool
use_reverse_pipe : Bool
}
///|
/// Default configuration: `@html.` prefix, 2-space indent, `Link` mode, named functions, reverse pipe.
pub impl Default for Config with default() {
{
module_prefix: "@html.",
indent: Some(" "),
a_tag_mode: Link,
convert_comments: false,
use_named_functions: true,
use_reverse_pipe: true,
}
}