<% initialize_hide_sections_with @custom_action.all_actions.map { |a| { key: a.key, label: a.human_name } }, @custom_action.actions.map { |a| { key: a.key, label: a.human_name } } %>
<%= f.text_field :name, required: true, container_class: '-middle' %>
<%= f.text_area :description, container_class: '-middle' %>
<%= t('custom_actions.conditions') %> <% @custom_action.all_conditions.each do |condition| %>
<%= styled_label_tag("custom_action_conditions_#{condition.key}", condition.human_name, class: '-top') %> <% input_name = "custom_action[conditions][#{condition.key}]" %> <% selected_values = condition.values select_options = condition.allowed_values.map { |v| { label: v[:label], value: v[:value], selected: selected_values.include?(v[:value]) } } %>
<%= render partial: 'augmented/autocomplete_select_decoration', locals: { input_name: input_name, input_id: "custom_action_conditions_#{condition.key}", select_options: select_options, multiple: true } %>
<% end %>
<%= t('custom_actions.actions.name') %>
<% @custom_action.all_actions.each do |action| %> <% end %>