@if($review)
    <?php $parsedReview = json_decode($review->data); ?>
    @if($parsedReview && !empty(trim(strip_tags($parsedReview->value))))
        <div class="inline-html-container <?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
            <?= @$parsedReview->value ?>
        </div>
        <div class="d-flex align-items-baseline pt-1 border-top mt-1 mb-2">
            @if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id)
                <span class="text-sm text-nowrap">(upd. on the chart)</span>
            @else
                @if ($point->last_child_review_point_scoped_note_id === $note->id)
                    <span class="text-sm text-nowrap">(upd. on this note)</span>
                @else
                    <div class="d-inline position-relative on-click-menu">
                        <span class="text-sm text-primary c-pointer text-nowrap">
                            Upd. <?= relative_friendly_date($review->note->effective_dateest) ?>
                        </span>
                        <div menu right class="bg-white border">
                            <a native target="_blank"
                               href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $review->note]) ?>"
                               class="px-2 py-1 d-block text-nowrap text-sm">Go to note</a>
                        </div>
                    </div>
                @endif
            @endif
            <span class="mx-2 text-secondary text-sm">|</span>
            <a class="text-sm copy-to-new-subjective" href="#">Copy to new subj.</a>
        </div>
    @else
        <span class="text-secondary text-sm">-</span>
    @endif
@else
    <span class="text-secondary text-sm">-</span>
@endif
