/**
 * Public types for `botmux ask` (v0.1.8).
 *
 * See `/tmp/botmux-ask.md` for the full design. This module is import-safe for
 * both the daemon side (broker, card builder, click handler) and the CLI side
 * (`botmux ask buttons` subcommand) — no runtime cross-imports.
 */
/** 旧单选语义兼容：仅当"单问且恰好选 1 个"时返回该 key，否则 null。
 *  `botmux ask buttons` 子命令与其测试据此保持单选行为不变。 */
export function toLegacySelected(result) {
    if (result.kind !== 'answered')
        return null;
    if (result.answers.length === 1 && result.answers[0].length === 1) {
        return result.answers[0][0];
    }
    return null;
}
//# sourceMappingURL=ask-types.js.map