import { debug } from "../../logging.js";
import { getSettings } from "../../settings.js";
import { HEADINGS } from "../constants.js";
export function renderAbout(renderer, chunk) {
    debug(`Rendering about chunk`);
    const { showDebugPlaceholders } = getSettings().display;
    renderer.createHeading(HEADINGS.PAGE_TITLE_HEADING_LEVEL, `About ${chunk.chunkData.title}`);
    if (chunk.chunkData.version) {
        renderer.createText(`_Version: ${chunk.chunkData.version}_`);
    }
    else if (showDebugPlaceholders) {
        renderer.createDebugPlaceholder(() => "No version provided");
    }
    if (chunk.chunkData.description) {
        renderer.createText(chunk.chunkData.description);
    }
    else if (showDebugPlaceholders) {
        renderer.createDebugPlaceholder(() => "No description provided");
    }
    if (chunk.chunkData.servers.length > 0) {
        renderer.createText("Servers");
        renderer.createList(chunk.chunkData.servers.map((server) => server.url));
    }
    else if (showDebugPlaceholders) {
        renderer.createDebugPlaceholder(() => "No servers provided");
    }
}
//# sourceMappingURL=about.js.map