import React from 'react';
import { Button, Type } from '../Button';
import { Email } from '../Input/Email';
import { Form } from '../Form';
import { FormType } from '../Form/component';
export var EmailCrawler = function EmailCrawler(props) {
  var handleChange = props.onChange,
      labels = props.labels,
      value = props.value,
      handleSubmit = props.onSubmit,
      messages = props.messages,
      handleEmailValid = props.onEmailValid,
      valid = props.valid;
  return React.createElement(Form, {
    onSubmit: handleSubmit,
    type: FormType.ONPLACE
  }, React.createElement(Email, {
    onChange: handleChange,
    id: "email",
    placeholder: labels.input,
    value: value,
    messages: messages,
    onValidChange: handleEmailValid
  }), React.createElement(Button, {
    type: Type.SUBMIT,
    disabled: !valid
  }, labels.button));
};