'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _TextInput = require('../../TextInput');

var _TextInput2 = _interopRequireDefault(_TextInput);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// eslint-disable-line no-unused-vars


var propTypes = {
  onChange: _propTypes2.default.func,
  onSubmit: _propTypes2.default.func,
  onKeyDown: _propTypes2.default.func,
  onFocus: _propTypes2.default.func,
  value: _propTypes2.default.string,
  placeholder: _propTypes2.default.string,
  input: _propTypes2.default.object,
  label: _propTypes2.default.string,
  className: _propTypes2.default.string
};

var defaultProps = {
  onChange: function onChange() {},
  onSubmit: function onSubmit() {},
  onKeyDown: function onKeyDown() {},
  onFocus: function onFocus() {},
  value: '',
  placeholder: undefined,
  input: {},
  label: '',
  className: undefined
};

/**
 * Autocomplete Search Group
 *
 */
var SearchGroup = function SearchGroup(_ref) {
  var value = _ref.value,
      placeholder = _ref.placeholder,
      onChange = _ref.onChange,
      onSubmit = _ref.onSubmit,
      onKeyDown = _ref.onKeyDown,
      onFocus = _ref.onFocus,
      input = _ref.input,
      label = _ref.label,
      className = _ref.className;
  return _react2.default.createElement(
    'form',
    { className: (className ? className + ' ' : '') + 'flive_autocomplete_input-group', autoComplete: 'off', onSubmit: onSubmit },
    _react2.default.createElement(_TextInput2.default, {
      onChange: onChange,
      onKeyDown: onKeyDown,
      onFocus: onFocus,
      value: value,
      placeholder: placeholder,
      input: input,
      label: label
    })
  );
};

SearchGroup.propTypes = propTypes;
SearchGroup.defaultProps = defaultProps;

exports.default = SearchGroup;
module.exports = exports['default'];