import { Fragment, jsx, jsxs } from "react/jsx-runtime";
import { AssociationCollectionFields, ParentCollectionFields, SelfFields } from "./items/index.mjs";
import { useCollectionFieldContext } from "./utils/index.mjs";
const CollectionFieldsToInitializerItems = (props)=>{
    const { selfField, parentField, associationField, block } = props;
    const context = useCollectionFieldContext();
    if (!context.collection) return null;
    return /*#__PURE__*/ jsxs(Fragment, {
        children: [
            /*#__PURE__*/ jsx(SelfFields, {
                block: block,
                ...selfField,
                context: {
                    ...context,
                    collection: context.collection
                }
            }),
            parentField && /*#__PURE__*/ jsx(ParentCollectionFields, {
                block: block,
                ...parentField,
                context: {
                    ...context,
                    collection: context.collection
                }
            }),
            associationField && /*#__PURE__*/ jsx(AssociationCollectionFields, {
                block: block,
                ...associationField,
                context: {
                    ...context,
                    collection: context.collection
                }
            })
        ]
    });
};
export { CollectionFieldsToInitializerItems };
