// Define optimized spring configurations
const springConfig = {
    type: "spring",
    stiffness: 500,
    damping: 30
};
/**
 * Base animation variants for the tooltip - optimized for smooth positioning
 */
const baseTooltipVariants = {
    initial: {
        opacity: 0,
        transition: { duration: 0.1 }
    },
    animate: {
        opacity: 1,
        transition: { ...springConfig, duration: 0.2 }
    },
    exit: {
        opacity: 0,
        transition: { duration: 0.15, damping: 35 }
    }
};
/**
 * Get animation variants based on tooltip placement
 * @param placement - Tooltip placement (top, right, bottom, left)
 * @returns Animation variants for the specified placement
 */
const getTooltipVariants = (placement) => {
    switch (placement) {
        case 'top':
            return {
                ...baseTooltipVariants,
                initial: { ...baseTooltipVariants.initial, y: 2 },
                animate: { ...baseTooltipVariants.animate, y: 0 },
                exit: { ...baseTooltipVariants.exit, y: 2 }
            };
        case 'right':
            return {
                ...baseTooltipVariants,
                initial: { ...baseTooltipVariants.initial, x: -2 },
                animate: { ...baseTooltipVariants.animate, x: 0 },
                exit: { ...baseTooltipVariants.exit, x: -2 }
            };
        case 'bottom':
            return {
                ...baseTooltipVariants,
                initial: { ...baseTooltipVariants.initial, y: -2 },
                animate: { ...baseTooltipVariants.animate, y: 0 },
                exit: { ...baseTooltipVariants.exit, y: -2 }
            };
        case 'left':
            return {
                ...baseTooltipVariants,
                initial: { ...baseTooltipVariants.initial, x: 2 },
                animate: { ...baseTooltipVariants.animate, x: 0 },
                exit: { ...baseTooltipVariants.exit, x: 2 }
            };
        default:
            return baseTooltipVariants;
    }
};
/**
 * Spring animation configuration options
 */
const tooltipSpringConfig = {
    light: {
        type: "spring",
        stiffness: 200,
        damping: 25
    },
    medium: springConfig,
    bouncy: {
        type: "spring",
        stiffness: 400,
        damping: 15
    }
};

export { baseTooltipVariants, getTooltipVariants, tooltipSpringConfig };
