%# locals: (category:) %> <% is_selected = category.id === @selected_category&.id %> <%= content_tag :div, class: ["filterable-item flex justify-between items-center border-none rounded-lg px-2 py-1 group w-full", { "bg-gray-25": is_selected }], data: { filter_name: category.name } do %> <%= button_to account_transaction_category_path( @transaction.entry, account_entry: { entryable_type: "Account::Transaction", entryable_attributes: { id: @transaction.id, category_id: category.id } } ), method: :patch, class: "flex w-full items-center gap-1.5 cursor-pointer" do %> <%= lucide_icon("check", class: "w-5 h-5 text-gray-500") if is_selected %> <% if category.subcategory? %> <%= lucide_icon "corner-down-right", class: "shrink-0 w-5 h-5 text-gray-400" %> <% end %> <%= render partial: "categories/badge", locals: { category: category } %> <% end %> <%= contextual_menu do %>