// 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 { ActionRow } from './action-row';
import type { ItemRowSize } from './item-row';
import { groupedRowClass, RowGroupContainer, type RowGroupItemBase, type RowGroupVariant } from './row-group';
// ---------------------------------------------------------------------------
// ActionRowGroup
// ---------------------------------------------------------------------------
export type ActionRowGroupItem = RowGroupItemBase & {
/** Press handler — the row shows hover/press overlays and the default chevron. */
onPress?: () => void;
/** URL for link-style navigation (React Native Web extension). */
href?: string;
};
export type ActionRowGroupProps = {
items: ActionRowGroupItem[];
variant?: RowGroupVariant;
size?: ItemRowSize;
className?: string;
style?: ViewProps['style'];
testID?: string;
};
/**
* A grouped list of actions, each rendered as an {@link ActionRow}.
*
* @example
*
*/
export function ActionRowGroup({
items,
variant = 'grouped',
size = 'md',
className,
style,
testID = 'action-row-group',
}: ActionRowGroupProps) {
const lastIndex = items.length - 1;
const rows = items.map((item, index) => (
));
return (
{rows}
);
}