import * as React from 'react';
import classNames from 'classnames';
import { Text } from '@box/blueprint-web';
import CompactCount from './CompactCount';
import './HeaderWithCount.scss';
function isNumber(count) {
  return typeof count === 'number';
}
function HeaderWithCount({
  isRedesignEnabled,
  title,
  totalCount
}) {
  return /*#__PURE__*/React.createElement("div", {
    className: classNames(!isRedesignEnabled && 'HeaderWithCount')
  }, isRedesignEnabled ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
    as: "span",
    variant: "bodyDefaultSemibold",
    color: "textOnLightSecondary"
  }, title), isNumber(totalCount) && /*#__PURE__*/React.createElement(CompactCount, {
    className: "HeaderWithCount-titleCount",
    count: totalCount,
    isRedesignEnabled: true
  })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
    className: "HeaderWithCount-title"
  }, title), isNumber(totalCount) && /*#__PURE__*/React.createElement(CompactCount, {
    className: "HeaderWithCount-titleCount",
    count: totalCount
  })));
}
export default HeaderWithCount;
//# sourceMappingURL=HeaderWithCount.js.map