import { COMMENT as e, DECLARATION as t, IMPORT as n, KEYFRAMES as r, LAYER as i, NAMESPACE as a, RULESET as o } from "./Enum.js";
import { strlen as s } from "./Utility.js";
//#region ../../node_modules/stylis/src/Serializer.js
function c(e, t) {
	for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
	return n;
}
function l(l, u, d, f) {
	switch (l.type) {
		case i: if (l.children.length) break;
		case n:
		case a:
		case t: return l.return = l.return || l.value;
		case e: return "";
		case r: return l.return = l.value + "{" + c(l.children, f) + "}";
		case o: if (!s(l.value = l.props.join(","))) return "";
	}
	return s(d = c(l.children, f)) ? l.return = l.value + "{" + d + "}" : "";
}
//#endregion
export { c as serialize, l as stringify };
