type DealDescriptionProps = {
  description: string
}

export default function DealDescription({ description }: DealDescriptionProps) {
  const hasText = Boolean(description && description.trim().length > 0)

  return (
    <div className="flex flex-col gap-3">
      <div className="flex items-center justify-between">
        <h2 className="text-lg font-semibold text-text">Açıklama</h2>

        {!hasText ? (
          <span className="text-xs text-text-muted bg-background border border-white/10 rounded-full px-3 py-1">
            Yok
          </span>
        ) : null}
      </div>

      {hasText ? (
        <p className="text-sm text-text-muted leading-relaxed whitespace-pre-line">
          {description}
        </p>
      ) : (
        <div className="rounded-2xl bg-background border border-white/10 p-4">
          <div className="text-sm font-semibold text-text">
            Açıklama eklenmemiş
          </div>
          <div className="text-xs text-text-muted mt-1">
            Bu fırsat için ek bilgi paylaşılmamış.
          </div>
        </div>
      )}
    </div>
  )
}
