<%= turbo_frame_tag "category_dropdown" do %>
" autocomplete="nope" type="search" class="placeholder:text-sm placeholder:text-gray-500 font-normal h-10 relative pl-10 w-full border-none rounded-lg" data-list-filter-target="input" data-action="list-filter#filter"> <%= lucide_icon("search", class: "w-5 h-5 text-gray-500 ml-2 absolute inset-0 transform top-1/2 -translate-y-1/2") %>
<% if @categories.any? %> <% Category::Group.for(@categories).each do |group| %> <%= render "category/dropdowns/row", category: group.category %> <% group.subcategories.each do |category| %> <%= render "category/dropdowns/row", category: category %> <% end %> <% end %> <% else %>

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

<%= button_to t(".bootstrap"), bootstrap_categories_path, class: "btn btn--outline", data: { turbo_frame: :_top } %>
<% end %>

<%= link_to new_category_path(transaction_id: @transaction), class: "flex text-sm font-medium items-center gap-2 text-gray-500 w-full rounded-lg p-2 hover:bg-gray-100", data: { turbo_frame: "modal" } do %> <%= lucide_icon "plus", class: "w-5 h-5" %> <%= t(".add_new") %> <% end %> <% if @transaction.category %> <%= button_to account_transaction_path(@transaction.entry.account, @transaction.entry), method: :patch, data: { turbo_frame: dom_id(@transaction.entry) }, params: { account_entry: { entryable_type: "Account::Transaction", entryable_attributes: { id: @transaction.id, category_id: nil } } }, class: "flex text-sm font-medium items-center gap-2 text-gray-500 w-full rounded-lg p-2 hover:bg-gray-100" do %> <%= lucide_icon "minus", class: "w-5 h-5" %> <%= t(".clear") %> <% end %> <% end %>
<% end %>