use crate::inferno_flags::VNodeFlags;

pub fn parse_vnode_flag(tag: &str) -> u16 {
    (match tag {
        "input" => VNodeFlags::InputElement,
        "textarea" => VNodeFlags::TextareaElement,
        "select" => VNodeFlags::SelectElement,
        // SVG ELEMENTS
        "altGlyph" => VNodeFlags::SvgElement,
        "altGlyphDef" => VNodeFlags::SvgElement,
        "altGlyphItem" => VNodeFlags::SvgElement,
        "animate" => VNodeFlags::SvgElement,
        "animateColor" => VNodeFlags::SvgElement,
        "animateMotion" => VNodeFlags::SvgElement,
        "animateTransform" => VNodeFlags::SvgElement,
        "circle" => VNodeFlags::SvgElement,
        "clipPath" => VNodeFlags::SvgElement,
        "color-profile" => VNodeFlags::SvgElement,
        "cursor" => VNodeFlags::SvgElement,
        "defs" => VNodeFlags::SvgElement,
        "desc" => VNodeFlags::SvgElement,
        "discard" => VNodeFlags::SvgElement,
        "ellipse" => VNodeFlags::SvgElement,
        "feBlend" => VNodeFlags::SvgElement,
        "feColorMatrix" => VNodeFlags::SvgElement,
        "feComponentTransfer" => VNodeFlags::SvgElement,
        "feComposite" => VNodeFlags::SvgElement,
        "feConvolveMatrix" => VNodeFlags::SvgElement,
        "feDiffuseLighting" => VNodeFlags::SvgElement,
        "feDisplacementMap" => VNodeFlags::SvgElement,
        "feDistantLight" => VNodeFlags::SvgElement,
        "feDropShadow" => VNodeFlags::SvgElement,
        "feFlood" => VNodeFlags::SvgElement,
        "feFuncA" => VNodeFlags::SvgElement,
        "feFuncB" => VNodeFlags::SvgElement,
        "feFuncG" => VNodeFlags::SvgElement,
        "feFuncR" => VNodeFlags::SvgElement,
        "feGaussianBlur" => VNodeFlags::SvgElement,
        "feImage" => VNodeFlags::SvgElement,
        "feMerge" => VNodeFlags::SvgElement,
        "feMergeNode" => VNodeFlags::SvgElement,
        "feMorphology" => VNodeFlags::SvgElement,
        "feOffset" => VNodeFlags::SvgElement,
        "fePointLight" => VNodeFlags::SvgElement,
        "feSpecularLighting" => VNodeFlags::SvgElement,
        "feSpotLight" => VNodeFlags::SvgElement,
        "feTile" => VNodeFlags::SvgElement,
        "feTurbulence" => VNodeFlags::SvgElement,
        "filter" => VNodeFlags::SvgElement,
        "font-face" => VNodeFlags::SvgElement,
        "font-face-format" => VNodeFlags::SvgElement,
        "font-face-name" => VNodeFlags::SvgElement,
        "font-face-src" => VNodeFlags::SvgElement,
        "font-face-uri" => VNodeFlags::SvgElement,
        "foreignObject" => VNodeFlags::SvgElement,
        "g" => VNodeFlags::SvgElement,
        "glyph" => VNodeFlags::SvgElement,
        "glyphRef" => VNodeFlags::SvgElement,
        "hkern" => VNodeFlags::SvgElement,
        "line" => VNodeFlags::SvgElement,
        "linearGradient" => VNodeFlags::SvgElement,
        "marker" => VNodeFlags::SvgElement,
        "mask" => VNodeFlags::SvgElement,
        "metadata" => VNodeFlags::SvgElement,
        "missing-glyph" => VNodeFlags::SvgElement,
        "mpath" => VNodeFlags::SvgElement,
        "path" => VNodeFlags::SvgElement,
        "pattern" => VNodeFlags::SvgElement,
        "polygon" => VNodeFlags::SvgElement,
        "polyline" => VNodeFlags::SvgElement,
        "radialGradient" => VNodeFlags::SvgElement,
        "rect" => VNodeFlags::SvgElement,
        "set" => VNodeFlags::SvgElement,
        "stop" => VNodeFlags::SvgElement,
        "svg" => VNodeFlags::SvgElement,
        "switch" => VNodeFlags::SvgElement,
        "symbol" => VNodeFlags::SvgElement,
        "text" => VNodeFlags::SvgElement,
        "textPath" => VNodeFlags::SvgElement,
        "tref" => VNodeFlags::SvgElement,
        "tspan" => VNodeFlags::SvgElement,
        "unknown" => VNodeFlags::SvgElement,
        "use" => VNodeFlags::SvgElement,
        "view" => VNodeFlags::SvgElement,
        "vkern" => VNodeFlags::SvgElement,
        "hatch" => VNodeFlags::SvgElement,
        "hatchpath" => VNodeFlags::SvgElement,
        "mesh" => VNodeFlags::SvgElement,
        "meshgradient" => VNodeFlags::SvgElement,
        "meshpatch" => VNodeFlags::SvgElement,
        "meshrow" => VNodeFlags::SvgElement,
        "solidcolor" => VNodeFlags::SvgElement,
        _ => VNodeFlags::HtmlElement,
    }) as u16
}
