%= content_tag :div,
data: {
target: "tab-group",
index: index,
controller: "tabs",
tabs_view_value: view,
tabs_group_id_value: group.id,
tabs_active_tab_value: active_tab_name,
tabs_resource_name_value: resource.underscore_name
} do %>
<% visible_tabs.each_with_index do |tab, index| %>
<%= content_tag :div, **args(tab) do %>
<%= render Avo::TabSwitcherComponent.new resource: resource, current_tab: visible_tabs.first, group: group, active_tab_name: tab.name, view: view %>
<% if !tab.is_empty? %>
<% tab.visible_items.each do |item| %>
<%= render Avo::Items::SwitcherComponent.new resource: resource, item: item, index: index, form: form, view: @view %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>