'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _Field = require('../record/Field');

var _Field2 = _interopRequireDefault(_Field);

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

var propTypes = {
  parentPath: _propTypes2.default.arrayOf(_propTypes2.default.string),
  name: _propTypes2.default.string,
  value: _propTypes2.default.string,
  readOnly: _propTypes2.default.bool,
  onCommit: _propTypes2.default.func
};

function SearchField(props) {
  var parentPath = props.parentPath,
      name = props.name,
      value = props.value,
      readOnly = props.readOnly,
      onCommit = props.onCommit;


  return _react2.default.createElement(_Field2.default, {
    label: undefined,
    parentPath: parentPath,
    name: name,
    readOnly: readOnly,
    repeating: false,
    value: value,
    viewType: 'search',
    onCommit: onCommit
    // Do not show quick add on autocomplete inputs.
    , showQuickAdd: false
  });
}

SearchField.propTypes = propTypes;