<?php

use App\Models\Client;
use App\Models\Note;

/** @var Client $patient */
/** @var Note $note */

if(!@$contentData) {
    $contentData = [
        "text" => '',
        "was_confirmed" => false,
        "note_uid" => (@$note ? $note->uid : '')
    ];
    if ($patient->canvas_data) {
        $canvasData = json_decode($patient->canvas_data, true);
        if (isset($canvasData["cc_may21"])) {
            $contentData = $canvasData["cc_may21"];
            if (!isset($contentData['text'])) $contentData['text'] = '';
            if (!isset($contentData['was_confirmed'])) $contentData['was_confirmed'] = false;
        }
    }
}
?>

<p><?= $contentData['text'] ? $contentData['text'] : '-' ?></p>
