import { isGenerator as f } from "../generators/utils/is-generator.es.js";
import { isAnimatable as l } from "./is-animatable.es.js";
import { warning as g } from "../../../../../../../motion-utils@12.36.0/node_modules/motion-utils/dist/es/errors.es.js";
function s(t) {
  const i = t[0];
  if (t.length === 1)
    return !0;
  for (let n = 0; n < t.length; n++)
    if (t[n] !== i)
      return !0;
}
function h(t, i, n, u) {
  const r = t[0];
  if (r === null)
    return !1;
  if (i === "display" || i === "visibility")
    return !0;
  const o = t[t.length - 1], a = l(r, i), e = l(o, i);
  return g(a === e, `You are trying to animate ${i} from "${r}" to "${o}". "${a ? o : r}" is not an animatable value.`, "value-not-animatable"), !a || !e ? !1 : s(t) || (n === "spring" || f(n)) && u;
}
export {
  h as canAnimate
};
//# sourceMappingURL=can-animate.es.js.map
