import { createMessageComponent } from '../../lib';
import Context from './Context';

/**
 * Already registered message for a RegisterForm
 * Displayed if the entered email address is already registered.
 * All props are passed down to SUI's `<Message>`
 * @param {Object} props - Props for SUI `<Message>`.
 * @returns {Object} component
 */
export const RegisterFormAlreadyRegisteredMessage = createMessageComponent(
  'RegisterFormAlreadyRegisteredMessage',
  Context,
  'error',
  'registered',
  { error: true }
);

export default RegisterFormAlreadyRegisteredMessage;
