import type { Book } from '../../shared/types.ts'; import { rowState } from '../bookstate.ts'; import { CallNo } from './CallNo.tsx'; import { StateMark, StateText } from './StateMark.tsx'; function Main({ book, showYear }: { book: Book; showYear: boolean }) { const byline = [book.authors.join(', '), showYear ? book.year : null].filter(Boolean).join(' · '); return ( {book.title} {byline ? {byline} : null} ); } /** A queued book on the Scan screen: state, call number, title, and the actions that apply. */ export function QueueRow({ book, onFix, onRemove }: { book: Book; onFix: () => void; onRemove: () => void }) { const kind = rowState(book).kind; return (
  • {kind === 'attention' ? : null}
  • ); } /** A book in the Library: the whole row opens the editor. */ export function LibraryRow({ book, onOpen }: { book: Book; onOpen: () => void }) { const kind = rowState(book).kind; return (
  • ); }