"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const resolveValue = require("./dist-es-utils-resolve-value.cjs");
const index = require("./dist-es-value-index.cjs");
const resolveDynamicVariants = require("./dist-es-render-utils-resolve-dynamic-variants.cjs");
function setMotionValue(visualElement, key, value) {
  if (visualElement.hasValue(key)) {
    visualElement.getValue(key).set(value);
  } else {
    visualElement.addValue(key, index.motionValue(value));
  }
}
function setTarget(visualElement, definition) {
  const resolved = resolveDynamicVariants.resolveVariant(visualElement, definition);
  let { transitionEnd = {}, transition = {}, ...target } = resolved || {};
  target = { ...target, ...transitionEnd };
  for (const key in target) {
    const value = resolveValue.resolveFinalValueInKeyframes(target[key]);
    setMotionValue(visualElement, key, value);
  }
}
exports.setTarget = setTarget;
//# sourceMappingURL=dist-es-render-utils-setters.cjs.map
