"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.FilterTranslationProvider = void 0;
var _react = _interopRequireDefault(require("react"));
var _react2 = require("@wix/bex-core/react");
var _DropdownTranslationProvider = require("./DropdownTranslationProvider");
var _useSelector = require("../useSelector");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/providers/FilterTranslationProvider.tsx";
const FilterTranslationProvider = ({
  children
}) => {
  const {
    translate: t,
    initTask
  } = (0, _react2.useWixPatternsContainer)();
  (0, _useSelector.useSelector)(() => initTask.status);
  const placeholder = (() => {
    const translationKey = 'cairo.selectPlaceholder';
    if (t(translationKey) !== translationKey) {
      return t(translationKey);
    }
    return '';
  })();
  return /*#__PURE__*/_react.default.createElement(_DropdownTranslationProvider.DropdownTranslationContext.Provider, {
    value: {
      translations: {
        selectedItems: ({
          total
        }) => t('cairo.dropdownSearch.filters.selected', {
          total
        }),
        emptyState: t('cairo.dropdownSearch.filters.emptyState'),
        noResultsState: t('cairo.dropdownSearch.filters.noResults'),
        placeholder,
        clearButtonTooltip: t('cairo.dropdownSearch.select.filers.clear')
      }
    },
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 21,
      columnNumber: 5
    }
  }, children);
};
exports.FilterTranslationProvider = FilterTranslationProvider;
//# sourceMappingURL=FilterTranslationProvider.js.map