import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { Overlay } from "./Overlay.js";
import { SelectList } from "./SelectList.js";
export function SessionSelector({ sessions, onSelect, onCancel }) {
    const items = sessions.map((s) => ({
        label: `${s.id.slice(0, 8)} — ${s.timestamp}`,
        value: s.path,
        description: `${s.messageCount} messages`,
    }));
    return (_jsx(Overlay, { title: "Select Session", children: _jsx(SelectList, { items: items, onSelect: onSelect, onCancel: onCancel }) }));
}
//# sourceMappingURL=SessionSelector.js.map