import { Link } from '@inertiajs/react'; import { modalityLabels } from '@/components/opportunity-search-filters'; import { offerPrice, type PublicOffer } from '@/lib/public-offer'; import { card } from '@/pages/investment/shared'; export default function PublicOfferCard({ offer, detail = false, }: { offer: PublicOffer; detail?: boolean; }) { const Heading = detail ? 'h1' : 'h2'; return (

{modalityLabels[offer.category]} ·{' '} {offer.location.map((node) => node.name).join(' / ') || 'Localização não indicada'}

{detail ? ( offer.title ) : ( {offer.title} )}

{offer.summary}

{offerPrice(offer.price)}

Publicada em{' '} {new Date(offer.published_at).toLocaleDateString('pt-MZ')}

{offer.expires_at && (

Validade até{' '} {new Date(offer.expires_at).toLocaleString('pt-MZ')}

)}
); }