"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.QuerySearch = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _mobxReactLite = require("mobx-react-lite");
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _react2 = require("@wix/bex-core/react");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/QuerySearch.tsx";
const QuerySearch = exports.QuerySearch = (0, _mobxReactLite.observer)(function QuerySearch({
  state,
  visibility,
  ...rest
}) {
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  return /*#__PURE__*/_react.default.createElement(_designSystem.Search, (0, _extends2.default)({
    dataHook: "collection-search",
    debounceMs: 300,
    onChange: e => {
      const value = e.target.value;
      state.changeValue(value);
    },
    value: state.value,
    onClear: () => {
      state.changeValue('');
    },
    placeholder: t('cairo.searchPlaceholder')
  }, rest, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 20,
      columnNumber: 5
    }
  }));
});
//# sourceMappingURL=QuerySearch.js.map