import type { Transition, Variants } from 'framer-motion'

export const uiSpring: Transition = {
  type: 'spring',
  stiffness: 420,
  damping: 34,
  mass: 0.9,
}

export const uiSoftSpring: Transition = {
  type: 'spring',
  stiffness: 360,
  damping: 32,
  mass: 0.95,
}

export const uiFadeTransition: Transition = {
  duration: .24,
  ease: 'easeOut',
}

export const modalOverlayTransition: Transition = {
  duration: 0.18,
  ease: 'easeOut',
}

export const modalContentTransition: Transition = {
  duration: 0.22,
  ease: [0.22, 1, 0.36, 1],
}

export const modalContentQuickTransition: Transition = {
  duration: 0.14,
  ease: 'easeOut',
}

export const pageSwapVariants: Variants = {
  initial: {
    opacity: 0,
    y: 8,
  },
  animate: {
    opacity: 1,
    y: 0,
  },
  exit: {
    opacity: 0,
    y: -6,
  },
}

export const popoverVariants: Variants = {
  initial: {
    opacity: 0,
    y: -4,
    scale: 0.98,
  },
  animate: {
    opacity: 1,
    y: 0,
    scale: 1,
  },
  exit: {
    opacity: 0,
    y: -4,
    scale: 0.98,
  },
}
