/** * PodcastCard component - Reusable card for displaying podcast info */ import { Show, For } from "solid-js"; import type { Podcast } from "@/types/podcast"; import { useTheme } from "@/context/ThemeContext"; import { SelectableBox, SelectableText } from "@/components/Selectable"; type PodcastCardProps = { podcast: Podcast; selected: boolean; compact?: boolean; onSelect?: () => void; onSubscribe?: () => void; }; export function PodcastCard(props: PodcastCardProps) { const { theme } = useTheme(); const handleSubscribeClick = () => { props.onSubscribe?.(); }; return ( props.selected} flexDirection="column" padding={1} onMouseDown={props.onSelect} > props.selected}> {props.podcast.title} [+] {/* Author */} props.selected} fg={theme.textMuted} > by {props.podcast.author} {/* Description */} props.selected} fg={theme.text} > {props.podcast.description!.length > 80 ? props.podcast.description!.slice(0, 80) + "..." : props.podcast.description} {/****/} 0}> {(cat) => [{cat}]} {props.podcast.isSubscribed ? "[Unsubscribe]" : "[Subscribe]"} ); }