package vdom

// HTML tag helpers over El.
//
// The set covers every tag kjol/webui actually renders, which is the bar that
// matters: a partial set is worse than none, because it forces a half-and-half style
// where `Div(...)` sits next to `El("thead", ...)` and the reader has to know which
// tags happen to be covered. If you reach for a tag that is not here, add it rather
// than falling back to El.
//
// El itself stays exported for the genuinely dynamic case — a tag chosen at runtime,
// as a component's `Tag` prop does.

// --- structure ---
func Div(m ...Mod) *VNode     { return El("div", m...) }
func Span(m ...Mod) *VNode    { return El("span", m...) }
func P(m ...Mod) *VNode       { return El("p", m...) }
func Section(m ...Mod) *VNode { return El("section", m...) }
func Article(m ...Mod) *VNode { return El("article", m...) }
func Aside(m ...Mod) *VNode   { return El("aside", m...) }
func Nav(m ...Mod) *VNode     { return El("nav", m...) }
func Header(m ...Mod) *VNode  { return El("header", m...) }
func Main(m ...Mod) *VNode    { return El("main", m...) }
func Footer(m ...Mod) *VNode  { return El("footer", m...) }
func Hr(m ...Mod) *VNode      { return El("hr", m...) }
func Br(m ...Mod) *VNode      { return El("br", m...) }

// --- headings ---
func H1(m ...Mod) *VNode { return El("h1", m...) }
func H2(m ...Mod) *VNode { return El("h2", m...) }
func H3(m ...Mod) *VNode { return El("h3", m...) }
func H4(m ...Mod) *VNode { return El("h4", m...) }
func H5(m ...Mod) *VNode { return El("h5", m...) }
func H6(m ...Mod) *VNode { return El("h6", m...) }

// --- inline ---
func A(m ...Mod) *VNode      { return El("a", m...) }
func Strong(m ...Mod) *VNode { return El("strong", m...) }
func B(m ...Mod) *VNode      { return El("b", m...) }
func Em(m ...Mod) *VNode     { return El("em", m...) }
func I(m ...Mod) *VNode      { return El("i", m...) }
func Small(m ...Mod) *VNode  { return El("small", m...) }
func Code(m ...Mod) *VNode   { return El("code", m...) }
func Pre(m ...Mod) *VNode    { return El("pre", m...) }

// --- lists ---
func Ul(m ...Mod) *VNode { return El("ul", m...) }
func Ol(m ...Mod) *VNode { return El("ol", m...) }
func Li(m ...Mod) *VNode { return El("li", m...) }

// --- forms ---
func Form(m ...Mod) *VNode     { return El("form", m...) }
func Fieldset(m ...Mod) *VNode { return El("fieldset", m...) }
func Legend(m ...Mod) *VNode   { return El("legend", m...) }
func Label(m ...Mod) *VNode    { return El("label", m...) }
func Input(m ...Mod) *VNode    { return El("input", m...) }
func Textarea(m ...Mod) *VNode { return El("textarea", m...) }
func Select(m ...Mod) *VNode   { return El("select", m...) }
func Option(m ...Mod) *VNode   { return El("option", m...) }
func Button(m ...Mod) *VNode   { return El("button", m...) }

// --- tables ---
func Table(m ...Mod) *VNode   { return El("table", m...) }
func Thead(m ...Mod) *VNode   { return El("thead", m...) }
func Tbody(m ...Mod) *VNode   { return El("tbody", m...) }
func Tfoot(m ...Mod) *VNode   { return El("tfoot", m...) }
func Tr(m ...Mod) *VNode      { return El("tr", m...) }
func Th(m ...Mod) *VNode      { return El("th", m...) }
func Td(m ...Mod) *VNode      { return El("td", m...) }
func Caption(m ...Mod) *VNode { return El("caption", m...) }

// --- media and misc ---
func Img(m ...Mod) *VNode    { return El("img", m...) }
func Canvas(m ...Mod) *VNode { return El("canvas", m...) }
func Dialog(m ...Mod) *VNode { return El("dialog", m...) }

// Svg and Path are the two SVG tags the icon layer needs. The reconciler creates
// them in the SVG namespace (see wasmruntime): an <svg> built as ordinary HTML is an
// inert unknown element that renders nothing.
func Svg(m ...Mod) *VNode  { return El("svg", m...) }
func Path(m ...Mod) *VNode { return El("path", m...) }
