/** * Calculate optimal number of spins based on prize count and duration * More prizes = fewer spins to avoid very long animations * Shorter duration = fewer spins for better performance * * @param prizesLength - Total number of prizes * @param duration - Animation duration in milliseconds * @returns Optimal number of complete spins */ export declare const calculateOptimalSpins: (prizesLength: number, duration: number) => number; /** * Calculate the offset needed to position the winning prize in the center * Includes multiple full rotations for a realistic lottery/roulette effect * * @param prizeSize - Size of each prize item (width or height depending on orientation) * @param winningIndex - Index of the winning prize * @param containerSize - Size of the container viewport * @param prizesLength - Total number of prizes in the array * @param minSpins - Minimum number of complete spins before landing (default: 5) * @returns Offset in pixels */ export declare const calculateOffset: (prizeSize: number, winningIndex: number, containerSize: number, prizesLength: number, minSpins?: number) => number; /** * Validate that the winning index is within bounds * * @param winningIndex - Index to validate * @param prizesLength - Total number of prizes * @throws Error if index is invalid */ export declare const validateWinningIndex: (winningIndex: number, prizesLength: number) => void; /** * Generate a unique ID for React keys * Uses crypto.randomUUID if available, falls back to timestamp + random * * @returns Unique string ID */ export declare const generateId: () => string; /** * Clamp a number between min and max values * * @param value - Value to clamp * @param min - Minimum value * @param max - Maximum value * @returns Clamped value */ export declare const clamp: (value: number, min: number, max: number) => number; //# sourceMappingURL=calculations.d.ts.map