import { buildTransform as h, buildTransformOrigin as T } from "./build-transform.es.js";
import { isCSSVariable as c } from "../../dom/utils/is-css-variable.es.js";
import { isTransformProp as e, isTransformOriginProp as S } from "./transform.es.js";
import { getValueAsType as K } from "../../dom/value-types/get-as-type.es.js";
import { numberValueTypes as P } from "../../dom/value-types/number.es.js";
function M(i, o, O, n) {
  var s, f = i.style, b = i.vars, d = i.transform, l = i.transformKeys, g = i.transformOrigin;
  l.length = 0;
  var u = !1, v = !1, m = !0;
  for (var r in o) {
    var a = o[r];
    if (c(r)) {
      b[r] = a;
      continue;
    }
    var p = P[r], t = K(a, p);
    if (e(r)) {
      if (u = !0, d[r] = t, l.push(r), !m)
        continue;
      a !== ((s = p.default) !== null && s !== void 0 ? s : 0) && (m = !1);
    } else
      S(r) ? (g[r] = t, v = !0) : f[r] = t;
  }
  u ? f.transform = h(i, O, m, n) : n ? f.transform = n({}, "") : !o.transform && f.transform && (f.transform = "none"), v && (f.transformOrigin = T(g));
}
export {
  M as buildHTMLStyles
};
//# sourceMappingURL=build-styles.es.js.map
