import { getValueAsType as p } from "../../../value/types/utils/get-as-type.es.js";
import { numberValueTypes as u } from "../../../value/types/maps/number.es.js";
import { transformProps as c } from "../../utils/keys-transform.es.js";
import { isCSSVariableName as g } from "../../../animation/utils/is-css-variable.es.js";
import { buildTransform as y } from "./build-transform.es.js";
function S(f, i, e) {
  const { style: o, vars: l, transformOrigin: t } = f;
  let m = !1, a = !1;
  for (const r in i) {
    const n = i[r];
    if (c.has(r)) {
      m = !0;
      continue;
    } else if (g(r)) {
      l[r] = n;
      continue;
    } else {
      const s = p(n, u[r]);
      r.startsWith("origin") ? (a = !0, t[r] = s) : o[r] = s;
    }
  }
  if (i.transform || (m || e ? o.transform = y(i, f.transform, e) : o.transform && (o.transform = "none")), a) {
    const { originX: r = "50%", originY: n = "50%", originZ: s = 0 } = t;
    o.transformOrigin = `${r} ${n} ${s}`;
  }
}
export {
  S as buildHTMLStyles
};
//# sourceMappingURL=build-styles.es.js.map
