import { confirm as clackConfirm, intro as clackIntro, outro as clackOutro, select as clackSelect, text as clackText, } from "@clack/prompts";
import { stylePromptHint, stylePromptMessage, stylePromptTitle } from "../terminal/prompt-style.js";
export const CONFIGURE_WIZARD_SECTIONS = [
    "workspace",
    "model",
    "web",
    "gateway",
    "daemon",
    "channels",
    "skills",
    "health",
];
export const CONFIGURE_SECTION_OPTIONS = [
    { value: "workspace", label: "工作区", hint: "设置工作区 + 会话" },
    { value: "model", label: "模型", hint: "选择提供商 + 凭据" },
    { value: "web", label: "Web工具", hint: "配置 Brave 搜索 + 获取" },
    { value: "gateway", label: "网关", hint: "端口、绑定、认证、Tailscale" },
    {
        value: "daemon",
        label: "守护进程",
        hint: "安装/管理后台服务",
    },
    {
        value: "channels",
        label: "渠道",
        hint: "连接 WhatsApp/Telegram 等并设置默认值",
    },
    { value: "skills", label: "技能", hint: "安装/启用工作区技能" },
    {
        value: "health",
        label: "健康检查",
        hint: "运行网关 + 渠道检查",
    },
];
export const intro = (message) => clackIntro(stylePromptTitle(message) ?? message);
export const outro = (message) => clackOutro(stylePromptTitle(message) ?? message);
export const text = (params) => clackText({
    ...params,
    message: stylePromptMessage(params.message),
});
export const confirm = (params) => clackConfirm({
    ...params,
    message: stylePromptMessage(params.message),
});
export const select = (params) => clackSelect({
    ...params,
    message: stylePromptMessage(params.message),
    options: params.options.map((opt) => opt.hint === undefined ? opt : { ...opt, hint: stylePromptHint(opt.hint) }),
});
