import React from 'react'; import { motion } from 'framer-motion'; const StatusIndicator = ({ status, color }) => { const getStatusConfig = () => { switch (status) { case 'FRESH': return { bg: 'from-green-500/20 to-green-600/10', border: 'border-green-500/50', glow: 'glow-green', icon: '✓', message: 'This produce is fresh and safe to consume!', tips: ['Store properly to maintain freshness', 'Consume within recommended time'] }; case 'CONSUME SOON': return { bg: 'from-amber-500/20 to-amber-600/10', border: 'border-amber-500/50', glow: 'glow-amber', icon: '⚠', message: 'This produce should be consumed soon.', tips: ['Use within 1-2 days', 'Check for any soft spots before consuming'] }; case 'SPOILED': return { bg: 'from-red-500/20 to-red-600/10', border: 'border-red-500/50', glow: 'glow-red', icon: '✕', message: 'This produce appears to be spoiled.', tips: ['Do not consume', 'Dispose of properly', 'Check other stored items'] }; default: return { bg: 'from-gray-500/20 to-gray-600/10', border: 'border-gray-500/50', glow: '', icon: '?', message: 'Status unknown', tips: [] }; } }; const config = getStatusConfig(); return (
{config.icon}

Final Status

{status}

{config.message}

{config.tips.length > 0 && (

Recommendations:

)}
); }; export default StatusIndicator;