import { capitalCase } from "change-case";
import { getSettings } from "../../settings.js";
import { HEADINGS } from "../constants.js";
export function renderTag(renderer, chunk) {
    const { name, description } = chunk.chunkData;
    const { showDebugPlaceholders } = getSettings().display;
    renderer.createTagSection({
        title: () => {
            renderer.createHeading(HEADINGS.PAGE_TITLE_HEADING_LEVEL, `${capitalCase(name)} Endpoints`);
        },
        description: description || showDebugPlaceholders
            ? () => {
                if (description) {
                    renderer.createText(description);
                }
                else if (showDebugPlaceholders) {
                    renderer.createDebugPlaceholder({
                        createTitle() {
                            renderer.createText("No tag description provided");
                        },
                        createExample() {
                            renderer.createCode(`tags:
  - name: ${name.replace("/", ".")}
    description: My awesome description`, {
                                variant: "default",
                                style: "block",
                            });
                        },
                    });
                }
            }
            : undefined,
    });
}
//# sourceMappingURL=tag.js.map