<?php

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

$point = Point::getGlobalSingletonOfCategory($patient, 'LIFESTYLE_GENERAL', false);

if ($point && @$point->data) {
    $contentData = $point->data;
?>

    <div id="v3_sleep_assessment_section" class="mt-3">

        <div class="row">

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">a.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                Please circle your current overall <b>LEVEL OF HEALTH</b>
                            </div>
                            <div class="col-6">
                                <?= @$contentData->current_overall_health_level ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">b.</div>
                    <div class="flex-grow-1">
                        <div class="row mb-2">
                            <div class="col-12">
                                Please rank the top <b>3 areas</b> you would like to improve with 1 being the most important and
                                3 the least important
                            </div>
                        </div>
                        <table class="table table-sm width-300px table-striped table-bordered m-0">
                            <tbody>
                            <tr>
                                <td class="text-nowrap align-middle">Sleep</td>
                                <td class="px-3">
                                    <?= @$contentData->sleep ?>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-nowrap align-middle">Weight Management</td>
                                <td class="px-3">
                                    <?= @$contentData->weight_management ?>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-nowrap align-middle">Nutrition</td>
                                <td class="px-3">
                                    <?= @$contentData->nutrition ?>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-nowrap align-middle">Exercise</td>
                                <td class="px-3">
                                    <?= @$contentData->exercise ?>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-nowrap align-middle">Purpose &amp; Connection</td>
                                <td class="px-3">
                                    <?= @$contentData->purpose_and_connection ?>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-nowrap align-middle">Mental Health</td>
                                <td class="px-3">
                                    <?= @$contentData->mental_health ?>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-nowrap align-middle">Substance Use</td>
                                <td class="px-3">
                                    <?= @$contentData->substance_use ?>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">c.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                How <b>IMPORTANT</b> is it for you to make the change you ranked as
                                the <b>#1</b> most motivated topic area to address?
                            </div>
                            <div class="col-6">
                                <?= @$contentData->how_important_rank_1_area ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">d.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                How <b>CONFIDENT</b> are you regarding your ability to make the
                                change you ranked as the <b>#1</b> most motivated topic area to
                                address?
                            </div>
                            <div class="col-6">
                                <?= @$contentData->how_confident_rank_1_area ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">e.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                How <b>IMPORTANT</b> is it for you to make the change you ranked as
                                the <b>#2</b> most motivated topic area to address?
                            </div>
                            <div class="col-6">
                                <?= @$contentData->how_important_rank_2_area ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">f.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                How <b>CONFIDENT</b> are you regarding your ability to make the
                                change you ranked as the <b>#2</b> most motivated topic area to
                                address?
                            </div>
                            <div class="col-6">
                                <?= @$contentData->how_confident_rank_2_area ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">g.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                How <b>IMPORTANT</b> is it for you to make the change you ranked as
                                the <b>#3</b> most motivated topic area to address?
                            </div>
                            <div class="col-6">
                                <?= @$contentData->how_important_rank_3_area ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">h.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-6">
                                How <b>CONFIDENT</b> are you regarding your ability to make the
                                change you ranked as the <b>#3</b> most motivated topic area to
                                address?
                            </div>
                            <div class="col-6">
                                <?= @$contentData->how_confident_rank_3_area ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="d-flex align-items-baseline mb-3">
                    <div class="pr-2 text-secondary font-weight-bold width-30px">i.</div>
                    <div class="flex-grow-1">
                        <div class="row">
                            <div class="col-12">
                                <div>
                                    <b>What would you like to gain from this lifestyle visit?</b> Check all that apply
                                </div>
                                <div>

                                    <div class="d-flex align-items-center">
                                        <span class="width-22px">
                                          <?php if (@$contentData->visit_gains && in_array('more_medical_scientific_knowledge', $contentData->visit_gains)) : ?>
                                              <i class="fa fa-check"></i>
                                          <?php endif; ?>
                                        </span>
                                        <span class="ml-2">More medical/scientific knowledge</span>
                                    </div>

                                    <div class="d-flex align-items-center">
                                        <span class="width-22px">
                                          <?php if (@$contentData->visit_gains && in_array('practical_health_tips', $contentData->visit_gains)) : ?>
                                              <i class="fa fa-check"></i>
                                          <?php endif; ?>
                                        </span>
                                        <span class="ml-2">Practical health tips</span>
                                    </div>

                                    <div class="d-flex align-items-center">
                                        <span class="width-22px">
                                          <?php if (@$contentData->visit_gains && in_array('accountability', $contentData->visit_gains)) : ?>
                                              <i class="fa fa-check"></i>
                                          <?php endif; ?>
                                        </span>
                                        <span class="ml-2">Accountability</span>
                                    </div>

                                    <div class="d-flex align-items-center">
                                        <span class="width-22px">
                                          <?php if (@$contentData->visit_gains && in_array('personalized_plan', $contentData->visit_gains)) : ?>
                                              <i class="fa fa-check"></i>
                                          <?php endif; ?>
                                        </span>
                                        <span class="ml-2">Personalized Plan</span>
                                    </div>

                                    <div class="d-flex align-items-center">
                                        <span class="width-22px">
                                          <?php if (@$contentData->visit_gains && in_array('other', $contentData->visit_gains)) : ?>
                                              <i class="fa fa-check"></i>
                                          <?php endif; ?>
                                        </span>
                                        <span class="ml-2">Other</span>
                                        <span class="ml-2 font-italic text-secondary"><?= @$contentData->gain_other_description ?></span>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

<?php
} else {
    echo '<div class="text-secondary">-</div>';
}
?>

