"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getOccupationLabel = void 0;
var _locale = require("@mirai/locale");
var _constants = require("./constants");
var _getAgeRange = require("./getAgeRange");
var _getGuestLabel = require("./getGuestLabel");
const {
  GUEST
} = _constants.OCCUPATION_TYPE;
const getOccupationLabel = function () {
  let {
    abbreviation = false,
    ages: [min, max] = [],
    amount,
    type = GUEST
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let translate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _locale.translate;
  return "".concat(amount > 0 ? "".concat(amount, " ") : '').concat((0, _getGuestLabel.getGuestLabel)({
    abbreviation,
    plural: amount > 1,
    type
  }, translate)).concat(min !== undefined || max !== undefined ? " (".concat((0, _getAgeRange.getAgeRange)([min, max], translate), ")") : '');
};
exports.getOccupationLabel = getOccupationLabel;
//# sourceMappingURL=getOccupationLabel.js.map