import React from 'react';
import { Text } from '../Input';
import { Select } from '../../forms/Select';
export var Address = function Address(_ref) {
  var street = _ref.street,
      streetNo = _ref.streetNo,
      postcode = _ref.postcode,
      cities = _ref.cities,
      countries = _ref.countries,
      handleFieldChange = _ref.onFieldChange,
      handleValidFieldChange = _ref.onValidFieldChange;
  return React.createElement("fieldset", {
    name: "address"
  }, React.createElement("div", {
    className: "form-row"
  }, React.createElement("div", {
    className: "col-6 mb-3"
  }, React.createElement(Text, Object.assign({
    label: street.label,
    id: street.id
  }, street, {
    onChange: handleFieldChange('street'),
    onValidChange: handleValidFieldChange('street')
  }))), React.createElement("div", {
    className: "col-2 mb-3"
  }, React.createElement(Text, Object.assign({
    label: streetNo.label,
    id: streetNo.id
  }, streetNo, {
    onChange: handleFieldChange('streetNo'),
    onValidChange: handleValidFieldChange('streetNo')
  }))), React.createElement("div", {
    className: "col-4 mb-3"
  }, React.createElement(Text, Object.assign({
    label: postcode.label,
    id: postcode.id
  }, postcode, {
    onChange: handleFieldChange('postcode'),
    onValidChange: handleValidFieldChange('postcode')
  })))), React.createElement("div", {
    className: "form-row"
  }, React.createElement("div", {
    className: "col-6 mb-3"
  }, React.createElement(Select, Object.assign({
    label: cities.label,
    id: cities.id
  }, cities, {
    onChange: handleFieldChange('cities'),
    onValidChange: function onValidChange() {},
    placeholder: ""
  }))), React.createElement("div", {
    className: "col-6 mb-3"
  }, React.createElement(Select, Object.assign({
    label: countries.label,
    id: countries.id
  }, countries, {
    onChange: handleFieldChange('countries'),
    onValidChange: function onValidChange() {},
    placeholder: ""
  })))));
};