import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { SelectList } from "../design/SelectList.js";
export function memoryFileOptions(paths, selectedPath) {
    return paths.map((memoryPath) => ({
        id: memoryPath,
        label: memoryPath.split(/[\\/]/).pop() || memoryPath,
        detail: memoryPath,
        selected: memoryPath === selectedPath,
        tone: memoryPath === selectedPath ? "success" : "default",
    }));
}
export function MemoryFileSelector(props) {
    return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "cyan", children: "Memory file" }), _jsx(SelectList, { options: memoryFileOptions(props.paths, props.selectedPath), width: props.width })] }));
}
