"use strict";
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2024-2026 Gracker (Chris)
// This file is part of SmartPerfetto. See LICENSE for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_OUTPUT_LANGUAGE = void 0;
exports.parseOutputLanguage = parseOutputLanguage;
exports.outputLanguageDisplayName = outputLanguageDisplayName;
exports.localize = localize;
exports.DEFAULT_OUTPUT_LANGUAGE = 'zh-CN';
function parseOutputLanguage(value) {
    const normalized = String(value || '').trim().toLowerCase();
    if (!normalized)
        return exports.DEFAULT_OUTPUT_LANGUAGE;
    if (['en', 'en-us', 'en_us', 'english'].includes(normalized)) {
        return 'en';
    }
    if ([
        'zh',
        'zh-cn',
        'zh_cn',
        'cn',
        'chinese',
        'simplified-chinese',
        'simplified_chinese',
    ].includes(normalized)) {
        return 'zh-CN';
    }
    return exports.DEFAULT_OUTPUT_LANGUAGE;
}
function outputLanguageDisplayName(language) {
    return language === 'en' ? 'English' : '简体中文';
}
function localize(language, zh, en) {
    return language === 'en' ? en : zh;
}
//# sourceMappingURL=outputLanguage.js.map