//#region src/chat-commands/format-output.ts
/**
* GFM formatters for slash-command replies.
*
* Command output is rendered as Markdown on Web UI, TUI (gateway), and channels
* (Telegram IR). Use blank-line-separated blocks and `-` lists — not single
* newlines or unicode `•` bullets — so lists and headings parse correctly.
*/
/** Join non-empty blocks with a blank line (GFM paragraph separation). */
function joinBlocks(...blocks) {
	return blocks.filter((b) => typeof b === "string" && b.trim().length > 0).join("\n\n").trimEnd();
}
/** Section heading (bold). */
function section(title) {
	return `**${title}**`;
}
/** Inline code span. */
function code(text) {
	return `\`${text}\``;
}
/** Italic hint / footnote. */
function hint(text) {
	return `_${text}_`;
}
/** GFM bullet list (`-` prefix). */
function bulletList(items) {
	if (items.length === 0) return "";
	return items.map((item) => {
		if (typeof item === "string") return `- ${item}`;
		return `- **${item.label}** — ${item.detail}`;
	}).join("\n");
}
/** Settings-style key/value bullets. */
function kvList(entries) {
	if (entries.length === 0) return "";
	return entries.map(({ key, value }) => `- **${key}**: ${value}`).join("\n");
}
/** Slash command reference line in a bullet list. */
function commandBullet(name, description, aliases) {
	return `- ${code(`/${name}${aliases?.length ? ` (${aliases.join(", ")})` : ""}`)} — ${description}`;
}
//#endregion
export { bulletList, code, commandBullet, hint, joinBlocks, kvList, section };

//# sourceMappingURL=format-output.js.map