import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { SelectList } from "./design/SelectList.js";
export function languagePickerOptions(selected = "auto") {
    const options = [
        ["auto", "Auto", "follow project and user language"],
        ["zh-CN", "Chinese", "Chinese UI and answers"],
        ["en", "English", "English UI and answers"],
    ];
    return options.map(([id, label, detail]) => ({
        id,
        label,
        detail,
        selected: id === selected,
        tone: id === selected ? "brand" : "default",
    }));
}
export function LanguagePicker(props) {
    return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "cyan", children: "Language" }), _jsx(SelectList, { options: languagePickerOptions(props.selected), width: props.width })] }));
}
