import '../../assert/js/assert.js';
import '../../globals.js';
/**
 * For groups like radio button groups or checkbox groups, where we need to flow the tandem through to the items.
 *
 * @author Sam Reid (PhET Interactive Simulations)
 */
import Tandem from '../../tandem/js/Tandem.js';
/**
 * Get the nodes for the GroupItemOptions
 */
export function getGroupItemNodes(array, tandem) {
    return array.map(item => {
        // @ts-expect-error - runtime check to prevent prior pattern, see https://github.com/phetsims/sun/issues/794
        assert && assert(!item.node, 'Use createNode instead of node');
        return item.createNode(tandem && item.tandemName ? tandem.createTandem(item.tandemName) : Tandem.OPTIONAL);
    });
}
//# sourceMappingURL=GroupItemOptions.js.map