"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _fieldTreeSelector = _interopRequireDefault(require("../../../../user-selector/export-modules/field-tree-selector"));

var _getLocale = require("../../../../../utils/getLocale");

require("../index.css");

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

var preCls = "ode-search-form";

function _default(_ref) {
  var selectUsers = _ref.selectUsers,
      setSelectUsers = _ref.setSelectUsers;

  var onSelectUser = function onSelectUser(node) {
    setSelectUsers(node.users);
  };

  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(preCls, "__field")
  }, /*#__PURE__*/_react["default"].createElement(_fieldTreeSelector["default"], {
    multiple: true,
    selectNodes: {
      users: selectUsers
    },
    onOk: onSelectUser,
    position: "bottomLeft",
    disabledDepartSelect: true,
    panes: {
      depart: true,
      group: false
    }
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(preCls, "__field-user"))
  }, (0, _getLocale.getLocale)("Per_Ma_form_detail_Personnel"), " ", /*#__PURE__*/_react["default"].createElement("i", {
    className: "tu-icon-arrow-down"
  }))));
}