import { Badge } from "@/components/ui/badge"; import { mediaKindLabel, type CollectionTemplate } from "@/lib/collectionTemplates"; const SOURCE_LABEL: Record = { tmdb: "TMDB", trakt: "Trakt", mdblist: "MDBList", tmdb_discover: "TMDB Discover", tmdb_collection: "TMDB Franchise", }; interface Props { template: CollectionTemplate; onPick: (template: CollectionTemplate) => void; } export function CollectionTemplateCard({ template, onPick }: Props) { return ( ); } function TemplateBadges({ template }: { template: CollectionTemplate }) { return ( <> {SOURCE_LABEL[template.source]} {template.requires_profile ? ( Profile ) : null} ); } function scheduleDescription(cron: string): string { const [, hour, dom, month, dow, extra] = cron.trim().split(/\s+/); if (!hour || !dom || !month || !dow || extra !== undefined) return "on schedule"; const stepMatch = hour.match(/^\*\/(\d+)$/); if (stepMatch) return `every ${stepMatch[1]} hours`; if (hour === "*") return "hourly"; if (dom === "1" && month === "*") return "monthly"; if (dom === "*" && month === "*" && dow === "*") return "daily"; if (dom === "*" && month === "*") return "weekly"; return "on schedule"; }