import '../../index.mjs';
import { initMotion } from './motion.mjs';
import Keyframe from '../../cssinjs/Keyframes.mjs';

const shakeIn = new Keyframe("antShakeIn", {
  "0%": {
    rotate: "0",
    scale: 0
  },
  "25%": {
    rotate: "7deg",
    scale: 0.25
  },
  "50%": {
    rotate: "-7deg",
    scale: 0.5
  },
  "75%": {
    rotate: "1deg",
    scale: 0.75
  },
  "100%": {
    rotate: "0",
    scale: 1
  }
});
const shakeOut = new Keyframe("antShakeOut", {
  "0%": {
    scale: 1
  },
  "25%": {
    scale: 0.75
  },
  "50%": {
    scale: 0.5
  },
  "75%": {
    scale: 0.25
  },
  "100%": {
    scale: 0
  }
});
function initShakeMotion(token) {
  const { antCls } = token;
  const motionCls = `${antCls}-shake`;
  return [
    initMotion(motionCls, shakeIn, shakeOut, "0.4s"),
    {
      [`
        ${motionCls}-enter,
        ${motionCls}-appear
      `]: {
        animationTimingFunction: "cubic-bezier(0.23, 1, 0.32, 1)"
      },
      [`${motionCls}-leave`]: {
        animationDuration: "0.2s",
        animationTimingFunction: token.motionEaseInOutCirc
      }
    }
  ];
}

export { initShakeMotion, shakeIn, shakeOut };
//# sourceMappingURL=shake.mjs.map
