"use strict";exports.__esModule = true;exports.pluralize = pluralize;var _locale = require("./locale");

function pluralize(
langCode,
count,
one,
two,
five)
{if (langCode === void 0) {langCode = _locale.LangCodes.ru_RU;}if (count === void 0) {count = 0;}if (one === void 0) {one = '';}if (two === void 0) {two = '';}if (five === void 0) {five = '';}
  if (langCode !== _locale.LangCodes.ru_RU) {
    // Для нестандартных языков используем простое склонение
    return count === 1 ? one : five;
  }

  var absCount = Math.abs(count);
  var lastTwoDigits = absCount % 100;
  var lastDigit = absCount % 10;

  if (lastTwoDigits >= 5 && lastTwoDigits <= 20) {
    return five;
  }

  switch (lastDigit) {
    case 1:
      return one;
    case 2:
    case 3:
    case 4:
      return two;
    default:
      return five;
  }
}