"use strict";
/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTranslationFiles = getTranslationFiles;
exports.translateContent = translateContent;
function getTranslationFiles(options) {
    return [
        {
            path: 'options',
            content: {
                title: {
                    message: options.blogTitle,
                    description: 'The title for the blog used in SEO',
                },
                description: {
                    message: options.blogDescription,
                    description: 'The description for the blog used in SEO',
                },
                'sidebar.title': {
                    message: options.blogSidebarTitle,
                    description: 'The label for the left sidebar',
                },
            },
        },
    ];
}
function translateContent(content, translationFiles) {
    const { content: translations } = translationFiles[0];
    return {
        ...content,
        blogTitle: translations.title?.message ?? content.blogTitle,
        blogDescription: translations.description?.message ?? content.blogDescription,
        blogSidebarTitle: translations['sidebar.title']?.message ?? content.blogSidebarTitle,
    };
}
