import { debug } from "../../logging.js";
import { escapeText } from "../../renderers/util.js";
import { getSettings } from "../../settings.js";
export function renderGlobalSecurity(renderer, chunk, headingLevel) {
    debug(`Rendering global security chunk`);
    const { showDebugPlaceholders } = getSettings().display;
    for (const entry of chunk.chunkData.entries) {
        const inPill = entry.in
            ? ` ${renderer.createPill("info", () => entry.in)}`
            : "";
        const typePill = entry.type
            ? ` ${renderer.createPill("info", () => entry.type)}`
            : "";
        renderer.createHeading(headingLevel, `${escapeText(entry.name, { escape: "markdown" })}${inPill}${typePill}`, {
            id: entry.name,
            escape: "none",
        });
        if (entry.description) {
            renderer.createText(entry.description);
        }
        else if (showDebugPlaceholders) {
            renderer.createDebugPlaceholder(() => "No description provided");
        }
    }
}
//# sourceMappingURL=globalSecurity.js.map