%= pb_content_tag(:tr) do %>
<% object.column_definitions.each_with_index do |column, index| %>
<% next unless column[:accessor].present? %>
<%= pb_rails("table/table_cell", props: { classname:object.td_classname(column)}) do %>
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
<% if collapsible_trail && index.zero? %>
<% (1..depth).each do |i| %>
<% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
<% left_offset = i * 1.0 + additional_offset %>
<% end %>
<% end %>
<%= 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 column[:custom_renderer].present? %>
<%= raw(column[:custom_renderer].call(object.row, custom_renderer_value(column, index))) %>
<% elsif 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 %>