import { sinceUnixDate } from "#/api/utils"; import { Chip } from "../Chip/Chip"; interface ChipProps { settings?: any; grade?: any; status?: any; status_id?: any; user_list?: any; episodes_released?: any; episodes_total?: any; category?: any; is_favorite?: any; last_view_episode?: any; last_view_timestamp?: any; } export const ReleaseChips = ({ settings, grade, status, status_id, user_list, episodes_released, episodes_total, category, is_favorite, last_view_episode, last_view_timestamp, }: ChipProps) => { const chipSettings = { enabled: true, gradeHidden: false, statusHidden: false, categoryHidden: false, episodesHidden: false, listHidden: false, favHidden: false, lastWatchedHidden: true, ...settings, }; return (
{!chipSettings.gradeHidden && grade ? : ""} {!chipSettings.listHidden && user_list && ( )} {!chipSettings.statusHidden && status ? : status_id != 0 && ( ) } {!chipSettings.episodesHidden && ( )} {!chipSettings.categoryHidden && category && } {!chipSettings.favHidden && is_favorite && (
)} {!chipSettings.lastWatchedHidden && last_view_episode && ( )}
); };