import React from 'react';
import { ErrorScreen } from '@/components/errors/ErrorScreen';

export interface FatalErrorViewData {
  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} 
    />
  );
}
