import { mainSymbols } from 'figures' import { Box, Text } from 'ink' import InkSelectInput from 'ink-select-input' export type Item = { key?: string label: string value: string } type Props = { items: Array onSelect: (item: Item) => void } type IndicatorProps = { isSelected: boolean } type ItemProps = { label: string isSelected: boolean } const IndicatorComponent = ({ isSelected }: IndicatorProps) => { return {isSelected ? {mainSymbols.pointer} : } } const ItemComponent = ({ label, isSelected }: ItemProps) => { return {label} } export const SelectInput = ({ items, onSelect }: Props) => { const initialIndex = items.findIndex((item) => item.label.includes('(recommended)')) return ( -1 ? initialIndex : 0} items={items} onSelect={onSelect} /> ) }