<?php
$tracking = [];
if (@($review->tracking->calorieIntake)) $tracking[] = 'Calorie Intake';
if (@($review->tracking->dailyCarbIntake)) $tracking[] = 'Daily Carb Intake';
if (@($review->tracking->portionSize)) $tracking[] = 'Portion Size';
if (@($review->tracking->eatingSpeed)) $tracking[] = 'Eating Speed';
$tracking = count($tracking) ? implode(', ', $tracking) : '-';
$foodMonitoring = [];
if (@($review->foodMonitoring->phoneTracker)) $foodMonitoring[] = 'Phone Tracker';
if (@($review->foodMonitoring->dailyFoodLog)) $foodMonitoring[] = 'Daily Food Log';
$foodMonitoring = count($foodMonitoring) ? implode(', ', $foodMonitoring) : '-';
if (@$review) {
    ?>
    <div class=""><span class="text-sm">Current number of weigh-ins per week:</span> <?= @($review->weighInsPerWeek) ?: '-' ?>.</div>
    <div class=""><span class="text-sm">Currently tracking:</span> <?= $tracking ?></div>
    <?php
    if (@($review->tracking->other) && @($review->tracking->otherDetail)) {
        ?>
        <div class=""><span class="text-sm">Other tracking:</span> <?= $review->tracking->otherDetail ?></div>
        <?php
    }
    ?>
    <div class=""><span class="text-sm">Current food monitoring:</span> <?= $foodMonitoring ?></div>
    <div class="text-secondary"><?= @($review->memo) ?: '' ?></div>
    <?php
} else {
    ?> - <?php
}
?>

