import { typography } from "../tokens/typography.js";
import { text } from "./text.js";
export function formatCommandNotFound(input) {
    const unknownInput = input.unknownCommand.replaceAll("\r\n", " ").replaceAll("\n", " ").replaceAll("\r", " ");
    const unknown = unknownInput.length > 0
        ? unknownInput
        : "<command>";
    return {
        label: `${typography.bold("Unknown command:")} ${text.command(unknown)}`,
        hint: `${text.muted("Run")} ${text.usageCommand(input.helpCommand)} ${text.muted("for available commands.")}`
    };
}
export function formatCommandNotFoundPanel(input) {
    const message = formatCommandNotFound({
        unknownCommand: input.unknownCommand,
        helpCommand: input.helpCommand
    });
    return {
        title: input.title ?? "command not found",
        label: message.label,
        footer: message.hint
    };
}
