"use client";
import { htmlVoidElements as r } from "./index.esm425.js";
import { svg as a, html as n } from "./index.esm426.js";
import { handle as i } from "./index.esm427.js";
const c = {}, m = {}, f = [];
function C(s, o) {
  const e = o || c, t = e.quote || '"', l = t === '"' ? "'" : '"';
  if (t !== '"' && t !== "'")
    throw new Error("Invalid quote `" + t + "`, expected `'` or `\"`");
  return {
    one: p,
    all: u,
    settings: {
      omitOptionalTags: e.omitOptionalTags || !1,
      allowParseErrors: e.allowParseErrors || !1,
      allowDangerousCharacters: e.allowDangerousCharacters || !1,
      quoteSmart: e.quoteSmart || !1,
      preferUnquoted: e.preferUnquoted || !1,
      tightAttributes: e.tightAttributes || !1,
      upperDoctype: e.upperDoctype || !1,
      tightDoctype: e.tightDoctype || !1,
      bogusComments: e.bogusComments || !1,
      tightCommaSeparatedLists: e.tightCommaSeparatedLists || !1,
      tightSelfClosing: e.tightSelfClosing || !1,
      collapseEmptyAttributes: e.collapseEmptyAttributes || !1,
      allowDangerousHtml: e.allowDangerousHtml || !1,
      voids: e.voids || r,
      characterReferences: e.characterReferences || m,
      closeSelfClosing: e.closeSelfClosing || !1,
      closeEmptyElements: e.closeEmptyElements || !1
    },
    schema: e.space === "svg" ? a : n,
    quote: t,
    alternative: l
  }.one(
    Array.isArray(s) ? { type: "root", children: s } : s,
    void 0,
    void 0
  );
}
function p(s, o, e) {
  return i(s, o, e, this);
}
function u(s) {
  const o = [], e = s && s.children || f;
  let t = -1;
  for (; ++t < e.length; )
    o[t] = this.one(e[t], t, s);
  return o.join("");
}
export {
  u as all,
  C as toHtml
};
//# sourceMappingURL=index.esm97.js.map
