import { global } from 'choerodon-ui/shared';

function isCssAnimationSupported() {
  var CSS_ANIMATION_SUPPORT = global.CSS_ANIMATION_SUPPORT;

  if (CSS_ANIMATION_SUPPORT !== undefined) {
    return CSS_ANIMATION_SUPPORT;
  }

  if (typeof window !== 'undefined') {
    var domPrefixes = ['webkit', 'moz', 'O', 'ms', 'khtml'];
    var elmStyle = document.createElement('div').style;
    var support = elmStyle.animationName !== undefined || domPrefixes.some(function (prefix) {
      return elmStyle["".concat(prefix, "AnimationName")] !== undefined;
    });
    global.CSS_ANIMATION_SUPPORT = support;
    return support;
  }

  return false;
}

export default isCssAnimationSupported;
//# sourceMappingURL=isCssAnimationSupported.js.map
