import { jsx as _jsx } from "react/jsx-runtime";
import { createElement as _createElement } from "react";
import { formGeneratorCn } from "../../utils/cn.js";
import { componentMap } from "../constants.js";
import './Fields.css';
const b = formGeneratorCn('fields');
const Fields = ({ fields, content, onUpdate, className }) => (_jsx("div", { className: b(null, className), children: fields.map((field, index) => {
        const Component = componentMap[field.type];
        if (!Component) {
            // eslint-disable-next-line
            console.warn(`NOT FOUND COMPONENT FOR TYPE ${field.type}`);
            return null;
        }
        return (_createElement(Component, { ...field, className: b('field'), key: index, content: content, onUpdate: onUpdate }));
    }) }));
export default Fields;
//# sourceMappingURL=Fields.js.map
