import React__default, { useState } from 'react';
import { u as useDataListContext } from './DataListContext-es.js';
import { D as DataListLayoutContext } from './DataListLayoutContext-es.js';
import { D as DataListItem } from './DataListItem-es.js';

function DataListItems({ size = "xs", }) {
    const { data, layouts } = useDataListContext();
    const [hasInLayoutActions, setHasInLayoutActions] = useState(false);
    const layout = layouts[size];
    if (!layout)
        return null;
    return (React__default.createElement(DataListLayoutContext.Provider, { value: {
            isInLayoutProvider: true,
            hasInLayoutActions,
            setHasInLayoutActions,
        } }, data.map((child, i) => (React__default.createElement(DataListItem, { key: data[i].id, index: i, item: child, layout: layout })))));
}

export { DataListItems as D };
