import { Button } from "./button"; import { Card, CardContent, CardHeader, CardTitle } from "./card"; import { Badge } from "./badge"; import { AlertTriangle, RefreshCw, Home, Bug } from "lucide-react"; interface ErrorFallbackProps { error?: Error; resetErrorBoundary?: () => void; title?: string; description?: string; } export const ErrorFallback = ({ error, resetErrorBoundary, title = "حدث خطأ غير متوقع", description = "نعتذر عن هذا الخطأ. يرجى المحاولة مرة أخرى." }: ErrorFallbackProps) => { const handleReload = () => { window.location.reload(); }; const handleGoHome = () => { window.location.href = '/'; }; return (
خطأ في النظام {title}

{description}

{error && (
تفاصيل الخطأ التقنية
                {error.message}
              
)}
{resetErrorBoundary && ( )}

إذا استمر الخطأ، يرجى التواصل مع الدعم الفني

); };