<%= title %>

<%= form.translated :text_field, :name, autofocus: true %> <%= form.number_field :weight %> <% if form.object.settings? %>
<%= t ".global_settings" %>
<%= form.fields_for :settings, form.object.settings do |settings_fields| %> <%= render partial: "decidim/admin/components/settings_fields", locals: { form: settings_fields, component: @component, settings_name: "global", tabs_prefix: "global-settings" } %> <% end %>
<% end %> <% if current_participatory_space.has_steps? %>
<%= t ".step_settings" %>
<% current_participatory_space.steps.each do |step| %>
<%= step.position + 1 %>. <%= translated_attribute step.title %> <% step_settings = form.object.step_settings[step.id.to_s] %> <%= form.fields_for :step_settings, nil do |settings_fields| %> <%= settings_fields.fields_for step.id.to_s, step_settings do |settings_fields| %> <%= render partial: "decidim/admin/components/settings_fields", locals: { form: settings_fields, component: component, settings_name: "step", tabs_prefix: "step-#{step.id}-settings" } %> <% end %> <% end %>
<% end %>
<% elsif form.object.default_step_settings? %>
<%= t ".default_step_settings" %>
<%= form.fields_for :default_step_settings, form.object.default_step_settings do |settings_fields| %> <%= render partial: "decidim/admin/components/settings_fields", locals: { form: settings_fields, component: @component, settings_name: "step", tabs_prefix: "default-step-settings" } %> <% end %>
<% end %>