import { buildTransform as p } from "./build-transform.es.js";
import { transformProps as u } from "../../../../../../../../motion-dom@12.23.23/node_modules/motion-dom/dist/es/render/utils/keys-transform.es.js";
import { isCSSVariableName as c } from "../../../../../../../../motion-dom@12.23.23/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.es.js";
import { getValueAsType as g } from "../../../../../../../../motion-dom@12.23.23/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.es.js";
import { numberValueTypes as y } from "../../../../../../../../motion-dom@12.23.23/node_modules/motion-dom/dist/es/value/types/maps/number.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 (u.has(r)) {
      m = !0;
      continue;
    } else if (c(r)) {
      l[r] = n;
      continue;
    } else {
      const s = g(n, y[r]);
      r.startsWith("origin") ? (a = !0, t[r] = s) : o[r] = s;
    }
  }
  if (i.transform || (m || e ? o.transform = p(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
