<?php

use App\Models\Client;
use App\Models\Point;
use App\Models\Note;
/** @var Client $patient */
/** @var Note $note */

$point = Point::getOnlyTopLevelPointOfCategory($note, request()->input('tlp'), true);

if($point) {
    ?> <div class="popup-content-container px-3"> <?php
    foreach ($point->childReviews as $childReview) {
        $contentData = $parsed = false;
        if ($childReview->data) {
            $childReview->data = json_decode($childReview->data, true);
            $contentData = $parsed = $childReview->data;

            if($contentData) {
                ?>
                <div class="mb-1 font-weight-bold">{{$childReview->creatorPro->displayName()}} - {{friendly_date($childReview->note->effective_dateest)}}</div>
                <div class="pl-3 bg-light border p-3 mb-3">
                    {{$contentData['value']}}
                </div>
                <?php
            }
        }
    }
    ?> </div> <?php
}