'use strict';

require('../../cssinjs/index.cjs');
var motion = require('./motion.cjs');
var Keyframes = require('../../cssinjs/Keyframes.cjs');

const fadeIn = new Keyframes.default("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
});
const fadeOut = new Keyframes.default("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
});
function initFadeMotion(token, sameLevel = false) {
  const { antCls } = token;
  const motionCls = `${antCls}-fade`;
  const sameLevelPrefix = sameLevel ? "&" : "";
  return [
    motion.initMotion(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel),
    {
      [`
        ${sameLevelPrefix}${motionCls}-enter,
        ${sameLevelPrefix}${motionCls}-appear
      `]: {
        opacity: 0,
        animationTimingFunction: "linear"
      },
      [`${sameLevelPrefix}${motionCls}-leave`]: {
        animationTimingFunction: "linear"
      }
    }
  ];
}

exports.fadeIn = fadeIn;
exports.fadeOut = fadeOut;
exports.initFadeMotion = initFadeMotion;
//# sourceMappingURL=fade.cjs.map
