defmodule ChesstrainerWeb.EndgameList do @moduledoc """ Shared, server-rendered filter bar and Key-grouped endgame list. The parent LiveView owns the filter/group state (see `ChesstrainerWeb.EndgameLive.Index`) and handles the `search_themes`, `add_theme`, `remove_theme`, `filter_key`, `clear_filters` and `toggle_group` events. Groups are rendered collapsed; the parent fetches a group's endgames only when it is expanded. """ use ChesstrainerWeb, :html attr :selected_themes, :list, required: true attr :theme_query, :string, required: true attr :theme_results, :list, required: true attr :keys, :list, required: true attr :selected_key, :string, default: nil def filter_bar(assigns) do ~H"""