const std = @import("std");

pub const Tag = enum {
    pub fn isSelf(tag: Tag) bool {
        const SELF_CLOSING_ONLY: []const Tag = &.{ .br, .hr, .img, .input, .link, .source, .track, .wbr };
        return std.mem.indexOfScalar(Tag, SELF_CLOSING_ONLY, tag) != null;
    }

    pub fn isVoid(tag: Tag) bool {
        const NO_CHILDREN_ONLY: []const Tag = &.{ .meta, .link, .input };
        return std.mem.indexOfScalar(Tag, NO_CHILDREN_ONLY, tag) != null;
    }

    aside,
    fragment,
    iframe,
    slot,
    img,
    html,
    base,
    head,
    link,
    meta,
    script,
    style,
    title,
    address,
    article,
    body,
    h1,
    h6,
    footer,
    header,
    h2,
    h3,
    h4,
    h5,
    hgroup,
    nav,
    section,
    dd,
    dl,
    dt,
    div,
    figcaption,
    figure,
    hr,
    li,
    ol,
    ul,
    menu,
    main,
    p,
    picture,
    pre,
    a,
    abbr,
    b,
    bdi,
    bdo,
    br,
    cite,
    code,
    data,
    time,
    dfn,
    em,
    i,
    kbd,
    mark,
    q,
    blockquote,
    rp,
    ruby,
    rt,
    rtc,
    rb,
    s,
    del,
    ins,
    samp,
    small,
    span,
    strong,
    sub,
    sup,
    u,
    @"var",
    wbr,
    area,
    map,
    audio,
    source,
    track,
    video,
    embed,
    object,
    param,
    canvas,
    noscript,
    caption,
    table,
    col,
    colgroup,
    tbody,
    tr,
    thead,
    tfoot,
    td,
    th,
    button,
    datalist,
    option,
    fieldset,
    label,
    form,
    input,
    keygen,
    legend,
    meter,
    optgroup,
    select,
    output,
    progress,
    textarea,
    details,
    dialog,
    menuitem,
    summary,
    content,
    element,
    shadow,
    template,
    acronym,
    applet,
    basefont,
    font,
    big,
    blink,
    center,
    command,
    dir,
    frame,
    frameset,
    isindex,
    listing,
    marquee,
    noembed,
    plaintext,
    spacer,
    strike,
    tt,
    xmp,
    // SVG Tags
    animate,
    animateMotion,
    animateTransform,
    circle,
    clipPath,
    defs,
    desc,
    ellipse,
    feBlend,
    feColorMatrix,
    feComponentTransfer,
    feComposite,
    feConvolveMatrix,
    feDiffuseLighting,
    feDisplacementMap,
    feDistantLight,
    feDropShadow,
    feFlood,
    feFuncA,
    feFuncB,
    feFuncG,
    feFuncR,
    feGaussianBlur,
    feImage,
    feMerge,
    feMergeNode,
    feMorphology,
    feOffset,
    fePointLight,
    feSpecularLighting,
    feSpotLight,
    feTile,
    feTurbulence,
    filter,
    foreignObject,
    g,
    image,
    line,
    linearGradient,
    marker,
    mask,
    metadata,
    mpath,
    path,
    pattern,
    polygon,
    polyline,
    radialGradient,
    rect,
    set,
    stop,
    svg,
    @"switch",
    symbol,
    text,
    textPath,
    tspan,
    use,
    view,
};
