"use client";
import { zwitch as n } from "../../../zwitch/index.js";
import { comment as r } from "./comment.js";
import { doctype as e } from "./doctype.js";
import { element as m } from "./element.js";
import { raw as i } from "./raw.js";
import { root as p } from "./root.js";
import { text as c } from "./text.js";
const y = n("type", {
  invalid: f,
  unknown: d,
  handlers: { comment: r, doctype: e, element: m, raw: i, root: p, text: c }
});
function f(o) {
  throw new Error("Expected node, not `" + o + "`");
}
function d(o) {
  const t = (
    /** @type {Nodes} */
    o
  );
  throw new Error("Cannot compile unknown node `" + t.type + "`");
}
export {
  y as handle
};
