import { RULESET as i, KEYFRAMES as f, COMMENT as p, DECLARATION as v, IMPORT as n } from "./Enum.js";
import { strlen as E, sizeof as M } from "./Utility.js";
function a(r, t) {
  for (var u = "", o = M(r), s = 0; s < o; s++)
    u += t(r[s], s, r, t) || "";
  return u;
}
function c(r, t, u, o) {
  switch (r.type) {
    case n:
    case v:
      return r.return = r.return || r.value;
    case p:
      return "";
    case f:
      return r.return = r.value + "{" + a(r.children, o) + "}";
    case i:
      r.value = r.props.join(",");
  }
  return E(u = a(r.children, o)) ? r.return = r.value + "{" + u + "}" : "";
}
export {
  a as serialize,
  c as stringify
};
//# sourceMappingURL=Serializer.js.map
