<% content_for :sidebar do %> <%= render "settings/nav" %> <% end %>

<%= t(".categories") %>

<%= link_to new_category_path, class: "btn btn--primary flex items-center gap-1 justify-center", data: { turbo_frame: :modal } do %> <%= lucide_icon "plus", class: "w-5 h-5" %>

<%= t(".new") %>

<% end %>
<% if @categories.any? %>

<%= t(".categories") %>

·

<%= @categories.count %>

<% Category::Group.for(@categories).each_with_index do |group, idx| %> <%= render group.category %> <% group.subcategories.each do |subcategory| %> <%= render subcategory %> <% end %> <% unless idx == Category::Group.for(@categories).count - 1 %> <%= render "categories/ruler" %> <% end %> <% end %>
<% else %>

<%= t(".empty") %>

<%= button_to t(".bootstrap"), bootstrap_categories_path, class: "btn btn--primary" %> <%= link_to new_category_path, class: "btn btn--outline flex items-center gap-1", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5") %> <%= t(".new") %> <% end %>
<% end %>
<%= settings_nav_footer %>