import "choerodon-ui/pro/lib/text-field/style";
import _TextField from "choerodon-ui/pro/lib/text-field";
import "choerodon-ui/pro/lib/icon/style";
import _Icon from "choerodon-ui/pro/lib/icon";
import React, { memo } from 'react';
import PropTypes from 'prop-types';
import { injectIntl } from 'react-intl';
import "./index.less";
var TreeSearch = injectIntl( /*#__PURE__*/memo(function (_ref) {
  var value = _ref.value,
      onChange = _ref.onChange,
      formatMessage = _ref.intl.formatMessage;
  return /*#__PURE__*/React.createElement("div", {
    className: "c7ncd-menu-search"
  }, /*#__PURE__*/React.createElement(_TextField, {
    className: "c7ncd-menu-search-input",
    placeholder: formatMessage({
      id: 'search.placeholder'
    }),
    clearButton: true,
    name: "search",
    value: value,
    prefix: /*#__PURE__*/React.createElement(_Icon, {
      type: "search"
    }),
    onChange: onChange
  }));
}));
TreeSearch.propTypes = {
  value: PropTypes.string,
  onChange: PropTypes.func
};
export default TreeSearch;