function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { useMemo } from "react";
import { Form } from "antd";
import { fieldMaps } from "../../../table/Table/fields";
import "./index.less";
var FilterItem = function FilterItem(props) {
  var label = props.label,
    type = props.type,
    name = props.name,
    other = props.other,
    isHidden = props.isHidden;
  var Com = useMemo(function () {
    var _fieldMaps;
    return (_fieldMaps = fieldMaps[type]) === null || _fieldMaps === void 0 ? void 0 : _fieldMaps.edit;
  }, [type]);
  return /*#__PURE__*/React.createElement(Form.Item, _extends({
    label: label,
    name: name
  }, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}, {
    hidden: isHidden
  }), /*#__PURE__*/React.createElement(Com, other));
};
export default FilterItem;