import { List, ListItemButton, ListItemText } from '@mui/material'; import type { PredefinedRowSelection } from '../../models'; interface Props { close: () => void; onSelectRowsWithCondition: ( condition: (row: Record) => boolean ) => void; predefinedRowsSelection: Array; } const PredefinedSelectionList = ({ close, predefinedRowsSelection, onSelectRowsWithCondition }: Props): JSX.Element => ( {predefinedRowsSelection.map(({ label, rowCondition }) => { const onSelectionClick = (): void => { onSelectRowsWithCondition(rowCondition); close(); }; return ( {label} ); })} ); export default PredefinedSelectionList;