@php
$cRequests = $appointment->confirmationRequests;
$cDecisions = $appointment->confirmationDecisions;
@endphp

@if($cRequests && count($cRequests))
    <p class="my-2"><b>Requests</b></p>
    @foreach($cRequests as $cRequest)
        <div class="bg-light p-1 my-1 border border">
            <div class="text-nowrap">{{ friendly_date_time($cRequest->created_at) }} to:
                @if($cRequest->to_sms_number)
                    <div class="text-sm"><i class="fa fa-sms text-secondary"></i> {{ $cRequest->to_sms_number }}</div>
                @endif
                @if($cRequest->to_email_address)
                    <div class="text-sm"><i class="fa fa-envelope text-secondary"></i> {{ $cRequest->to_email_address }}</div>
                @endif
            </div>
            <div class="text-secondary text-sm on-hover-text-reveal">{{ $cRequest->message }}</div>
        </div>
    @endforeach
@endif

@if($cDecisions && count($cDecisions))
    <p class="my-2"><b>Decisions</b></p>
    @foreach($cDecisions as $cDecision)
        <div class="bg-light p-1 my-1 border border">
            <b class="{{$cDecision->decision_enum === 'CONFIRMED' ? 'text-success' : 'text-warning-mellow'}}">{{$cDecision->decision_enum}}</b> on {{ friendly_date_time($cDecision->created_at) }}
            @if($cDecision->memo)
                <div class="text-sm">
                    <i>{{$cDecision->memo}}</i>
                </div>
            @endif
        </div>
    @endforeach
@endif
