import {IconArrowsExclamation, Icon} from '@bthlabs/homehub-icons';
import ClassName from 'classnames';
import React from 'react';

export const FatalError = (props) => {
  const className = ClassName('FatalError', props.className);

  return (
    <div className={className}>
      <Icon icon={IconArrowsExclamation} size="0.8rem" />
      <p>
        The service <code>{props.service.kind}:{props.service.instance}</code>
        {' '}
        has encountered an error:
        {' '}
        <code>{props.serviceState.error().message}</code>
      </p>
    </div>
  );
};
