"use strict";

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

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

var _drawer = _interopRequireDefault(require("../drawer"));

var _filterForm = _interopRequireDefault(require("./filter-form"));

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

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

var Filter = function Filter(_ref) {
  var _ref$visible = _ref.visible,
      visible = _ref$visible === void 0 ? false : _ref$visible,
      _ref$setVisible = _ref.setVisible,
      setVisible = _ref$setVisible === void 0 ? function () {} : _ref$setVisible,
      onSearch = _ref.onSearch,
      setFilterNum = _ref.setFilterNum;

  var closeFilterDrawer = function closeFilterDrawer() {
    return setVisible(false);
  };

  return /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
    visible: visible,
    onClose: closeFilterDrawer,
    mask: true,
    maskClosable: true,
    width: 450,
    destroyOnClose: false
  }, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
    content: (0, _getLocale.getLocale)("OKR_MyO_Title_Advanced")
  }), /*#__PURE__*/_react["default"].createElement(_filterForm["default"], {
    onSearch: onSearch,
    closeFilterDrawer: closeFilterDrawer,
    setFilterNum: setFilterNum
  }));
};

var _default = Filter;
exports["default"] = _default;