import React from 'react';
import { Box, Text } from 'ink';

interface ErrorDisplayProps {
  message: string;
  onDismiss?: () => void;
}

export function ErrorDisplay({ message, onDismiss }: ErrorDisplayProps) {
  return (
    <Box flexDirection="column" borderStyle="round" borderColor="red" paddingX={1}>
      <Text color="red" bold>
        Fehler
      </Text>
      <Text color="red">{message}</Text>
      {onDismiss && (
        <Text color="gray" dimColor>
          [Enter] Schließen
        </Text>
      )}
    </Box>
  );
}
