@endif
{{-- ============================ NOTICES =========================== --}}
@if (in_array($mode, ['cancelled', 'closed', 'won', 'lost', 'declined', 'receipt'], true))
@php
$notice = match ($mode) {
'cancelled' => ['tone' => 'slate', 'title' => __('This request has been withdrawn'), 'body' => __('The buyer cancelled this request for quotation. Nothing further is needed from you.')],
'closed' => ['tone' => 'slate', 'title' => __('This request is now closed'), 'body' => __('The deadline has passed and quotations can no longer be submitted or changed. Thank you for your interest.')],
'won' => ['tone' => 'emerald', 'title' => __('Your quotation was successful'), 'body' => __('Congratulations, your quotation has been accepted. A purchase order will follow from the buyer.')],
'lost' => ['tone' => 'slate', 'title' => __('This request has been awarded'), 'body' => __('On this occasion the business went elsewhere. Thank you for taking the time to quote, we will be in touch on the next one.')],
'declined' => ['tone' => 'amber', 'title' => __('You declined this request'), 'body' => __('We have recorded that you are unable to quote on this occasion. Thank you for letting us know.')],
default => ['tone' => 'emerald', 'title' => __('Quotation received, thank you'), 'body' => __('Your pricing is with the buying team. You will hear from them once all quotations have been reviewed.')],
};
$tones = [
'emerald' => ['bg-emerald-50', 'border-emerald-200', 'bg-emerald-100 text-emerald-600', 'text-emerald-900', 'text-emerald-700'],
'amber' => ['bg-amber-50', 'border-amber-200', 'bg-amber-100 text-amber-600', 'text-amber-900', 'text-amber-700'],
'slate' => ['bg-slate-50', 'border-slate-200', 'bg-slate-100 text-slate-500', 'text-slate-900', 'text-slate-600'],
];
[$bg, $border, $chip, $titleTone, $bodyTone] = $tones[$notice['tone']];
@endphp
{{ __('Valid until') }}{{ $invitation->valid_until->format('j M Y') }}
@endif
{{ __('Submitted') }}{{ optional($invitation->submitted_at)->format('j M Y, H:i') }}
@endif
@endif
{{-- Still open? Let them change their mind either way. --}}
@if ($isOpen && in_array($mode, ['receipt', 'declined'], true))
@if ($deadline)
{{ __('You can change your answer until :when.', ['when' => $deadline->format('j M Y, H:i')]) }}