import { Children } from 'react';
/**
 * A utility component that iterates over an array and renders each item using the provided render function.
 *
 * @component
 * @example
 * // Example usage of Each component
 * <Each
 *   of={['apple', 'banana', 'orange']}
 *   render={(item, index) => (
 *     <div>{index}: {item}</div>
 *   )}
 * />
 *
 * @param {Object} props - The properties of the Each component.
 * @param {T[]} props.of - The array of items to iterate over and render.
 * @param {(item: T, index: number) => ReactNode} props.render - A function that renders each item in the array.
 *
 * @returns {ReactNode} The rendered Each component.
 */
export function Each({ of, render }) {
    return Children.toArray(of.map((item, index) => render(item, index)));
}
//# sourceMappingURL=Each.jsx.map