>

<%= label %>

<%= description %>

<%= form.simple_fields_for name do |nested| %>
<% inputs.values.each do |input| %> <%= input.render self, nested, new_record %> <% end %>
<% if nested.object.new_record? || allow_destroy %> <% end %>
<%= nested.hidden_field :_destroy %>
<% end %>
<%= render_component :button, label: "Add #{name.to_s.singularize.humanize}", classname: "mt-4", data: { action: "nested-resource-form-fields#add", "nested-resource-form-fields-target": "addButton" } %>