"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.FilterAccordionTitle = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _PatternsThemeProvider = require("../../themes/PatternsThemeProvider");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/FiltersPanel/FilterAccordionTitle.tsx";
function _FilterAccordionTitle(props) {
  const {
    state,
    filterProps
  } = props;
  const {
    accordionItemProps
  } = filterProps;
  const filter = state.getPendingFilter(props.filter);
  const {
    sizes
  } = (0, _PatternsThemeProvider.usePatternsTheme)();
  return /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
    dataHook: `accordion-item-title-${filter.name}`,
    ellipsis: true,
    weight: "normal",
    size: sizes.medium,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 24,
      columnNumber: 5
    }
  }, `${(accordionItemProps == null ? void 0 : accordionItemProps.label) ?? ''}${filter.size > 0 ? ` (${filter.size})` : ''}`);
}
const FilterAccordionTitle = exports.FilterAccordionTitle = (0, _mobxReactLite.observer)(_FilterAccordionTitle);
//# sourceMappingURL=FilterAccordionTitle.js.map