// TitleCardSquare.tsx
import type { Title } from "../../api/models/Title";

export function TitleCardSquare({ title }: { title: Title }) {
  return (
    <div style={{
      width: 160,
      border: "1px solid #ddd",
      padding: 8,
      borderRadius: 8,
      textAlign: "center"
    }}>
      {title.poster?.image_path && (
        <img src={title.poster.image_path} width={140} />
      )}
      <div>
        <h4>{title.title_names["en"]}</h4>
        <small>{title.release_year} • {title.rating}</small>
      </div>
    </div>
  );
}
