"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ValueDisplayMultiSelect = ValueDisplayMultiSelect;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _ = require("../../..");
var _Select = require("../Select.styles");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var StyledTypography = (0, _styledComponents.default)(_.Typography).withConfig({
  displayName: "ValueDisplayMultiSelect__StyledTypography",
  componentId: "sc-1fihppj-0"
})(["display:block;margin-right:", "px;", ""], function (_ref) {
  var theme = _ref.theme;
  return theme.spacing.unit(2);
}, _Select.ellipsis);
function ValueDisplayMultiSelect(props) {
  var label = props.label,
    placeholder = props.placeholder,
    selectedCount = props.selectedCount;
  if (selectedCount === 0) {
    return _react.default.createElement(StyledTypography, {
      type: "secondary",
      color: function color(t) {
        return t.colorTokens.neutral.text_weak;
      }
    }, placeholder);
  }
  return _react.default.createElement(_.Flexbox, {
    container: true,
    alignItems: "center",
    gap: 1
  }, _react.default.createElement(_.Flexbox, {
    item: true
  }, _react.default.createElement(_.Badge.Number, {
    size: 4
  }, selectedCount)), _react.default.createElement(_.Flexbox, {
    item: true
  }, _react.default.createElement(StyledTypography, {
    type: "secondary",
    color: "inherit"
  }, label)));
}