"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.TabTotalParens = void 0;
var _mobxReactLite = require("mobx-react-lite");
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _useFilterValueTotalState = require("./useFilterValueTotalState");
var _initTabTotal = require("../../state/initTabTotal");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/TabTotal/TabTotalParens.tsx";
function _TabTotalParens(props) {
  const state = (0, _useFilterValueTotalState.useFilterValueTotalState)(props);
  const {
    totalsCollection: {
      result: {
        total
      },
      initTask
    }
  } = state;
  const {
    isIdle,
    isLoading
  } = initTask.status;
  return isIdle || isLoading ? null : /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
    size: "small",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 29,
      columnNumber: 5
    }
  }, "(", /*#__PURE__*/_react.default.createElement("span", {
    "data-hook": "total",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30,
      columnNumber: 8
    }
  }, total), ")");
}
_TabTotalParens.initTabTotal = _initTabTotal.initTabTotal;
const TabTotalParens = exports.TabTotalParens = (0, _mobxReactLite.observer)(_TabTotalParens);
TabTotalParens.displayName = 'TabTotalParens';
TabTotalParens.initTabTotal = _initTabTotal.initTabTotal;
//# sourceMappingURL=TabTotalParens.js.map