<?php

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

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

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

<div id="v2_sleep_assessment_section" class="mt-3">
    <div class="row">
        <div class="col-md-12">
            <h5 class="bg-light p-1 font-weight-bold">GETTING STARTED</h5>
        </div>
    </div>

    <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="p-0">
                                <?= @$contentData->sleep ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="text-nowrap align-middle">Weight Management</td>
                            <td class="p-0">
                                <?= @$contentData->weight_management ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="text-nowrap align-middle">Nutrition</td>
                            <td class="p-0">
                                <?= @$contentData->nutrition ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="text-nowrap align-middle">Exercise</td>
                            <td class="p-0">
                                <?= @$contentData->exercise ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="text-nowrap align-middle">Purpose &amp; Connection</td>
                            <td class="p-0">
                                <?= @$contentData->purpose_and_connection ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="text-nowrap align-middle">Mental Health</td>
                            <td class="p-0">
                                <?= @$contentData->mental_health ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="text-nowrap align-middle">Substance Use</td>
                            <td class="p-0">
                                <?= @$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>
                      <?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-3">More medical/scientific knowledge</span>
                                </div>

                                <div class="d-flex align-items-center">
                    <span>
                      <?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-3">Practical health tips</span>
                                </div>

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

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

                                <div class="d-flex align-items-center">
                    <span>
                      <?php if (@$contentData->visit_gains && in_array('other', $contentData->visit_gains)) : ?>
                          <i class="fa fa-check"></i>
                      <?php endif; ?>
                    </span>
                                    <span class="ml-3">Other</span>
                                </div>

                                <div class="form-group mt-3">
                                    <label>Other</label>
                                    <?= @$contentData->gain_other_description ?>
                                </div>

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

    </div>

    <hr>

    <div class="row">
        <div class="col-md-12">
            <h5 class="bg-light p-1 font-weight-bold">SLEEP</h5>
            <p><b>Please answer based on your sleeping patterns OVER the LAST TWO WEEKS</b></p>
        </div>
    </div>

    <div class="row mb-1">
        <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">
                            How often have you had difficulty staying awake during routine tasks?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_difficulty_staying_awake_routine_tasks ?>
                        </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">
                        <div class="col-6">
                            How often have you had difficulty staying awake while driving?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_difficulty_staying_awake_driving ?>
                        </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">c.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            How often have you felt fatigued or needed to nap during the day?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_need_to_nap_during_the_day ?>
                        </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 often has it taken you more than 30 minutes to fall asleep at night?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_taken_you_more_than_30_mins_to_sleep ?>
                        </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 often have you woken up at night?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_woken_up_at_night ?>
                        </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 often have you unintentionally woken up early in the morning?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_unintentionally_woken_up_in_morning ?>
                        </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 often do you look at a screen within 2 hours of sleeping (i.e. TV, computer, iPad, or Phone)?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_look_at_screen_within_2_hours_of_sleep ?>
                        </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 often have your legs or arms jerked during sleep?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_legs_or_arms_jerked_during_sleep ?>
                        </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-6">
                            How often have you experienced “creeping” or “crawling” feelings in your legs?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_experienced_creeping_crawling_in_legs ?>
                        </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">j.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            How often have you snored loudly, gasped, choked, or stopped breathing during sleep?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_snored_loudly_gasped_choked_during_sleep ?>
                        </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">k.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            How often have you used sleeping aids (i.e. tobacco, alcohol, over-the-counter medications, or
                            prescription medications) to help you fall asleep?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_used_sleeping_aids_to_sleep ?>
                        </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">l.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            Do you have a job that requires night shifts?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_have_a_job_that_requires_shifts ?>
                        </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">m.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            Do you have a medical condition or chronic pain that interferes with your sleep?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_have_medical_condition_affecting_sleep ?>
                        </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">n.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            On an average weekday do you get at least 7-8 hours of sleep in a 24-hour period?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_do_you_get_at_least_7_8_hours_sleep_weekday ?>
                        </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">o.</div>
                <div class="flex-grow-1">
                    <div class="row">
                        <div class="col-6">
                            On an average weekend do you get at least 7-8 hours of sleep in a 24-hour period?
                        </div>
                        <div class="col-6">
                            <?= @$contentData->sleep_do_you_get_at_least_7_8_hours_sleep_weekend ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

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

