"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_i18next_1 = require("react-i18next");
const Translation_1 = require("../translations/Translation");
class StringHelper {
    static plural(count, word, t) {
        switch (word.toLowerCase()) {
            case 'child':
            case 'children':
                return count <= 1 ? t(Translation_1.Translation.Step.Date.Child) : t(Translation_1.Translation.Step.Date.Child_plural);
            case 'infant':
                return count <= 1 ? t(Translation_1.Translation.Step.Date.Infant) : t(Translation_1.Translation.Step.Date.Infant_plural);
            default:
                return count <= 1 ? word : `${word}s`;
        }
    }
    static pluralWithCount(count, word, t) {
        return `${count} ${this.plural(count, word, t)}`;
    }
    static pluralWithDict(count, path, translation) {
        if (!translation) {
            const { t } = (0, react_i18next_1.useTranslation)();
            translation = t;
        }
        const target = count <= 1 ? path : `${path}_plural`;
        return translation(target);
    }
    static pluralWithDictAndCount(count, path, translation) {
        return `${count} ${this.pluralWithDict(count, path, translation)}`;
    }
}
exports.default = StringHelper;
//# sourceMappingURL=StringHelper.js.map