import { jsx, Fragment } from "react/jsx-runtime";
import { Component } from "@contember/binding";
import { AutoField } from "./AutoField.js";
const AutoFields = Component(
  (props, env) => {
    const schema = env.getSchema();
    const entity = env.getSubTreeNode().entity;
    const fields = Array.from(entity.fields.values()).filter((it) => props.excludedFields === void 0 || !props.excludedFields.includes(it.name));
    const autoFields = fields.map((field) => /* @__PURE__ */ jsx(
      AutoField,
      {
        schema,
        entityName: entity.name,
        fieldName: field.name,
        createEditLink: props.createEditLink,
        excludedEntities: [entity.name, ...props.excludedEntities ?? []]
      },
      field.name
    ));
    return /* @__PURE__ */ jsx(Fragment, { children: autoFields });
  }
);
export {
  AutoFields
};
//# sourceMappingURL=AutoFields.js.map
