import { ErrorScreen } from '@/components/errors/ErrorScreen';
import { ViewData } from '@/lib/contracts/view-data/ViewData';

export interface FatalErrorViewData extends ViewData {
  error: Error & { digest?: string };
}

interface FatalErrorTemplateProps {
  viewData: FatalErrorViewData;
  reset: () => void;
  onHome: () => void;
}

/**
 * FatalErrorTemplate
 * 
 * The top-most error template for the global error boundary.
 * Follows "Precision Racing Minimal" theme via ErrorScreen.
 */
export function FatalErrorTemplate({ viewData, reset, onHome }: FatalErrorTemplateProps) {
  return (
    <ErrorScreen 
      error={viewData.error} 
      reset={reset} 
      onHome={onHome} 
    />
  );
}
