const toastAnimations = {
    // Initial state when toast appears
    initial: {
        opacity: 0,
        y: 50,
        scale: 0.3,
    },
    // Exit animation when toast is dismissed
    exit: {
        opacity: 0,
        scale: 0.5,
        transition: { duration: 0.2 },
    },
    // Spring transition configuration
    transition: {
        type: "spring",
        stiffness: 500,
        damping: 30,
        mass: 1,
    },
};
// Stacking animation utilities
const getToastStackingAnimation = (index, totalToasts, isExpanded, expandedY) => {
    if (totalToasts === 1)
        return {};
    const maxVisible = 3; // Show max 3 toasts in stack
    const stackIndex = Math.min(index, maxVisible - 1);
    if (isExpanded) {
        return {
            y: expandedY !== null && expandedY !== void 0 ? expandedY : index * 80,
            scale: 1,
            zIndex: totalToasts - index,
            opacity: 1,
        };
    }
    else {
        // Stacked state - compress toasts
        if (index >= maxVisible) {
            return {
                y: (maxVisible - 1) * 10,
                scale: 1 - (maxVisible - 1) * 0.08,
                zIndex: 0,
                opacity: 0.3,
            };
        }
        return {
            y: stackIndex * 10,
            scale: 1 - stackIndex * 0.08,
            zIndex: totalToasts - index,
            opacity: 1 - stackIndex * 0.25,
        };
    }
};

export { getToastStackingAnimation, toastAnimations };
