// biome-ignore-all lint/style/useExportsLast: the entry types head the module so the implementations below read against them import { Fragment } from 'react'; import type { ViewProps } from 'react-native'; import type { ItemRowSize } from './item-row'; import { ItemRow } from './item-row'; import { groupedRowClass, RowGroupContainer, type RowGroupItemBase, type RowGroupVariant } from './row-group'; // --------------------------------------------------------------------------- // ItemRowGroup // --------------------------------------------------------------------------- export type ItemRowGroupItem = RowGroupItemBase; export type ItemRowGroupProps = { items: ItemRowGroupItem[]; variant?: RowGroupVariant; size?: ItemRowSize; className?: string; style?: ViewProps['style']; testID?: string; }; /** * A grouped list of static rows, each rendered as an {@link ItemRow}. * * @example * }, * { id: 'bt', title: 'Bluetooth', rightAdornment: }, * ]} * /> */ export function ItemRowGroup({ items, variant = 'grouped', size = 'md', className, style, testID = 'item-row-group', }: ItemRowGroupProps) { const lastIndex = items.length - 1; const rows = items.map((item, index) => ( )); return ( {rows} ); }