import { acceleratedValues as i } from "../utils/accelerated-values.es.js";
import { hasBrowserOnlyColors as f } from "../utils/is-browser-color.es.js";
import { memo as u } from "../../../../../../../../motion-utils@12.36.0/node_modules/motion-utils/dist/es/memo.es.js";
const b = /* @__PURE__ */ new Set([
  "color",
  "backgroundColor",
  "outlineColor",
  "fill",
  "stroke",
  "borderColor",
  "borderTopColor",
  "borderRightColor",
  "borderBottomColor",
  "borderLeftColor"
]), d = /* @__PURE__ */ u(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
function g(t) {
  var e;
  const { motionValue: r, name: o, repeatDelay: n, repeatType: s, damping: a, type: l, keyframes: p } = t;
  if (!(((e = r == null ? void 0 : r.owner) == null ? void 0 : e.current) instanceof HTMLElement))
    return !1;
  const { onUpdate: m, transformTemplate: c } = r.owner.getProps();
  return d() && o && /**
   * Force WAAPI for color properties with browser-only color formats
   * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.
   */
  (i.has(o) || b.has(o) && f(p)) && (o !== "transform" || !c) && /**
   * If we're outputting values to onUpdate then we can't use WAAPI as there's
   * no way to read the value from WAAPI every frame.
   */
  !m && !n && s !== "mirror" && a !== 0 && l !== "inertia";
}
export {
  g as supportsBrowserAnimation
};
//# sourceMappingURL=waapi.es.js.map
