const defaultSpringTransition = {
    type: 'spring',
    stiffness: 200,
    damping: 60,
    mass: 1,
};
const ANIMATION_PRESETS = {
    fadeUp: { opacity: 0, y: 24 },
    fadeDown: { opacity: 0, y: -24 },
    fadeIn: { opacity: 0 },
    scale: { opacity: 0, scale: 0.9 },
    slideLeft: { opacity: 0, x: -24 },
    slideRight: { opacity: 0, x: 24 },
};
function getAnimationVariants(preset, customTransition) {
    const initial = ANIMATION_PRESETS[preset];
    return {
        hidden: { ...initial },
        visible: {
            opacity: 1,
            y: 0,
            x: 0,
            scale: 1,
            transition: customTransition !== null && customTransition !== void 0 ? customTransition : defaultSpringTransition,
        },
    };
}
function getGroupVariants(stagger, delay) {
    return {
        hidden: {},
        visible: {
            transition: {
                staggerChildren: stagger,
                delayChildren: delay,
            },
        },
        exit: {
            transition: {
                staggerChildren: stagger * 0.5,
                staggerDirection: -1,
            },
        },
    };
}
function getExitVariant(preset) {
    return { ...ANIMATION_PRESETS[preset] };
}

export { ANIMATION_PRESETS, defaultSpringTransition, getAnimationVariants, getExitVariant, getGroupVariants };
