"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.FilterAccordionResetButton = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _react2 = require("@wix/bex-core/react");
var _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/FiltersPanel/FilterAccordionResetButton.tsx";
function _FilterAccordionResetButton(props) {
  const {
    state
  } = props;
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  const filter = state.getPendingFilter(props.filter);
  if (filter.isEmpty) {
    return null;
  }
  return /*#__PURE__*/_react.default.createElement(_designSystem.TextButton, {
    dataHook: `reset-filter-${filter.name}`,
    size: "medium",
    onClick: e => {
      e.stopPropagation();
      filter.reset({
        emitEvents: ['change', 'refresh']
      });
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 26,
      columnNumber: 5
    }
  }, t('cairo.filtersPanel.reset'));
}
const FilterAccordionResetButton = exports.FilterAccordionResetButton = (0, _mobxReactLite.observer)(_FilterAccordionResetButton);
//# sourceMappingURL=FilterAccordionResetButton.js.map