import React, { useMemo } from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import { TextRoleNucleonProps } from './nucleons/useTextRoleNucleon'; import useSelectorItemsNucleon from './nucleons/useSelectorPropsNucleon'; import UIRadioItemAtom from './UIRadioItemAtom'; import selectedRadioItemContextAtom from './selectedRadioItemContextAtom'; import BoxNucleon from './nucleons/BoxNucleon'; import { SelectorListProps } from './nucleons/types'; import { useSpacing } from '@mobily/stacks'; export interface UIRadioGroupControlMoleculeProps extends SelectorListProps { style?: StyleProp; labelStyle?: TextRoleNucleonProps; } export default function UIRadioGroupControlMolecule({ items, selectedValue, onSelectedValueChange, style, labelStyle }: UIRadioGroupControlMoleculeProps) { const normalizedItems = useSelectorItemsNucleon(items); const spacing = useSpacing(2); const itemStyle = useMemo(() => ({ paddingHorizontal: spacing }), [spacing]); return ( {normalizedItems.map((props, i) => ( ))} ); }