<%= pb_content_tag do %> <% object.column_definitions.each_with_index do |column, index| %> <%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %> <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %> <% if index.zero? && object.row[:children].present? %> <% end %> <%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %> <% if index.zero? %> <% if object.depth.zero? %> <%= object.row[column[:accessor].to_sym] %> <% else %> <% object.depth_accessors.each_with_index do |item, accessor_index| %> <% if object.depth - 1 == accessor_index %> <% key = item.to_sym %> <%= object.row[key] %> <% end %> <% end %> <% end %> <% else %> <%= object.row[column[:accessor].to_sym] %> <% end %> <% end %> <% end %>
<% end %> <% end %> <% end %> <% end %>