{{-- Offer card (home page and offers page). Params: $offer, $index (for the placeholder image), $subscribeInPage (true on the offers page: the button fills the form below instead of linking). --}} @php $newPrice = $offer->discountedPrice(); $oldPrice = $offer->basePrice(); $currency = trans('site.doctors.currency'); $money = fn (float $amount) => rtrim(rtrim(number_format($amount, 2), '0'), '.'); @endphp
{{ $offer->title }} @if ((float) $offer->discount_value > 0) {{ $offer->discountLabel() }} {{ trans('site.offers.discount') }} @endif

{{ $offer->title }}

@if ($offer->description)

{{ $offer->description }}

@endif @if ($newPrice !== null)
@if ($oldPrice > $newPrice) {{ $money($oldPrice) }} {{ $currency }} @endif {{ $money($newPrice) }} {{ $currency }}
@endif @if ($subscribeInPage ?? false) {{ trans('site.offers.subscribe') }} @else {{ trans('site.offers.subscribe') }} @endif