import type { DataProduct } from '@/types'
import { ImagePlaceholder } from '@/components/shared/ImagePlaceholder'

interface DataReportCoverProps {
  product: DataProduct
  className?: string
  compact?: boolean
  hideBadge?: boolean
}

export function DataReportCover({ product, className = '' }: DataReportCoverProps) {
  if (!product.coverUrl) {
    return <ImagePlaceholder label={`暂无图片：${product.title}`} className={className} />
  }
  return (
    <div
      className={`relative overflow-hidden rounded-[6px] border border-line bg-[#eef3f8] bg-cover bg-center ${className}`}
      style={{ backgroundImage: `url(${product.coverUrl})` }}
    >
      <div className="absolute inset-0 bg-[linear-gradient(180deg,rgba(4,24,48,0.10),rgba(4,24,48,0.36))]" />
    </div>
  )
}
