import React from 'react';
import { Link } from '@remix-run/react';

interface ErrorBoundaryProps {
  status: number;
  statusText: string;
  message: string;
}

export function ErrorBoundary({ status, statusText, message }: ErrorBoundaryProps) {
  return (
    <div className="min-h-screen flex flex-col items-center justify-center bg-gray-50 px-4">
      <div className="text-center">
        <h1 className="text-6xl font-bold text-primary mb-4">{status}</h1>
        <p className="text-xl font-medium text-gray-800 mb-6">{statusText}</p>
        <p className="text-base text-gray-600 mb-8">{message}</p>
        <Link 
          to="/"
          className="ant-btn ant-btn-primary"
        >
          <i className="ri-home-line mr-1"></i> 返回首页
        </Link>
      </div>
      <div className="mt-12 text-center">
        <p className="text-sm text-gray-500">如果问题持续存在，请联系系统管理员</p>
        <p className="text-sm text-gray-500 mt-1">技术支持：support@tobacco-ai-system.com</p>
      </div>
    </div>
  );
} 