package templates import ( "fmt" "mal/internal/database" "mal/internal/shared/ui" ) templ Watchlist(entries []database.GetUserWatchListRow, layout string, currentStatus string, sortBy string, sortOrder string) { @Layout("My Watchlist") {

Watchlist

Export
All Watching Continuing On hold Plan to watch Dropped Completed
@ui.SortFilter(ui.SortFilterOptions{Sort: sortBy, Order: sortOrder, View: layout, Status: currentStatus}) if len(entries) == 0 { @ui.EmptyState("Nothing here yet") { if currentStatus == "all" { Your watchlist is empty. Search for anime to get started. } else if currentStatus == "continuing" { No airing anime with watching or plan to watch status. } else { No anime in this category. } } } else { if layout == "grid" {
for _, entry := range entries {
@ui.AnimeCard(ui.AnimeCardProps{ ID: int(entry.AnimeID), Title: entry.DisplayTitle(), ImageURL: entry.ImageUrl, })
}
} else { for _, entry := range entries { }
Title
{ { entry.DisplayTitle() }
} } } } func viewClass(active bool) string { if active { return "active" } return "" } func tabClass(active bool) string { if active { return "active" } return "" }