'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('../../../theme/style/motion/index.cjs');
var slide = require('../../../theme/style/motion/slide.cjs');

const genMotionStyle = (token) => {
  const { componentCls, motionDurationSlow } = token;
  return [
    {
      [componentCls]: {
        [`${componentCls}-switch`]: {
          "&-appear, &-enter": {
            "transition": "none",
            "&-start": {
              opacity: 0
            },
            "&-active": {
              opacity: 1,
              transition: `opacity ${motionDurationSlow}`
            }
          },
          "&-leave": {
            "position": "absolute",
            "transition": "none",
            "inset": 0,
            "&-start": {
              opacity: 1
            },
            "&-active": {
              opacity: 0,
              transition: `opacity ${motionDurationSlow}`
            }
          }
        }
      }
    },
    // Follow code may reuse in other components
    [slide.initSlideMotion(token, "slide-up"), slide.initSlideMotion(token, "slide-down")]
  ];
};

exports.default = genMotionStyle;
//# sourceMappingURL=motion.cjs.map
