import React from 'react'; import { motion } from 'framer-motion'; import { AlertTriangle, CheckCircle, Info } from 'lucide-react'; interface CriticFeedbackProps { isApproved: boolean; feedback: string; severity: 'low' | 'medium' | 'high'; onApplyFixes?: () => void; } const CriticFeedbackPanel: React.FC = ({ isApproved, feedback, severity, onApplyFixes }) => { const getColors = () => { if (isApproved) return { border: 'var(--accent-green)', bg: 'rgba(16, 185, 129, 0.1)', header: 'var(--accent-green)', icon: }; if (severity === 'high') return { border: '#EF4444', bg: 'rgba(239, 68, 68, 0.1)', header: '#FCA5A5', icon: }; if (severity === 'medium') return { border: '#F59E0B', bg: 'rgba(245, 158, 11, 0.1)', header: '#FCD34D', icon: }; return { border: 'var(--accent-blue)', bg: 'rgba(59, 130, 246, 0.1)', header: '#93C5FD', icon: }; }; const colors = getColors(); return (
{colors.icon} Zgodność i Ocena (AI Critic)
{feedback}
{!isApproved && (
Wprowadź poprawki do tekstu powyżej i poproś o ponowną ewaluację. {onApplyFixes && ( )}
)}
); }; export default CriticFeedbackPanel;