import {AnimeData} from "../_utils/anime.ts" import {AnimeRow, AnimeRowColumnKind, animeRowColumnKindDefault, AnimeRowColumnPriority} from "./AnimeRow.tsx" export type AnimeTableProps = { id?: string, anime: AnimeData[], columns?: AnimeRowColumnKind[] priority?: AnimeRowColumnPriority } export function AnimeTable({id, anime, columns = animeRowColumnKindDefault, priority}: AnimeTableProps) { const colElements = columns.map((column, index) => { switch(column) { case "rating": return ( ) case "progress": return ( ) case "name": return ( ) case "hascontent": return ( ) case "date": return ( ) } }) const thElements = columns.map((column, index) => { switch(column) { case "rating": return ( ) case "progress": return ( ) case "name": return ( Title ) case "namesort": return ( Sort by ) case "hascontent": return ( ) case "date": return ( Date ) } }) const trTdElements = anime.map((ani: AnimeData) => ( )) return ( {colElements} {thElements} {trTdElements}
) }