export const list = {
  hidden: { opacity: 1, scale: 0 },
  visible: {
    opacity: 1,
    scale: 1,
    transition: {
      delayChildren: 0.1,
      staggerChildren: 0.05,
    },
  },
}

export const item = {
  hidden: { y: 5, opacity: 0 },
  visible: {
    y: 0,
    opacity: 1,
  },
}
export const variants = {
  hidden: {
    scale: 0,
    x: '-50%', // 起始位置向左偏移
  },
  visible: {
    opacity: 1,
    scale: 1,
    x: 0,
    transition: {
      type: 'tween',
      stiffness: 360,
      damping: 20,
    },
  },
  exit: {
    opacity: 0,
    scale: 0,
    x: '-50%',
    transition: {
      duration: 0.4,
      ease: 'easeOut', // 改为 easeOut
    },
  },
}
export const containerVariants = {
  hidden: {},
  visible: {},
}
export const itemVariants = {
  hidden: { opacity: 0, y: 20, scale: 0.8 },
  visible: (i: number) => ({
    opacity: 1,
    y: 0,
    scale: 1,
    transition: {
      delay: i * 0.03,
      type: 'spring',
      stiffness: 200,
      damping: 20,
      mass: 0.8,
    },
  }),
  exit: {
    opacity: 0,
    scale: 0.8,
    transition: { duration: 0.2 },
  },
}
