<div moe large class="mr-2" id="rpm_manager-cm-entry-form{{@$entry ? '-' . $entry->uid : ''}}">
    <a start show class="py-0 mb-3">{{@$entry ? 'Edit' : 'Add'}}</a>
    <form url="/api/careMonthEntry/{{@$entry ? 'updateSimpleForRm' : 'createForRm'}}" {{@$right ? 'right' : ''}} {{@$hook ? 'hook=' . $hook : ''}}>
        @if(@$entry)
            <input type="hidden" name="uid" value="{{ $entry->uid }}">
        @else
            <input type="hidden" name="careMonthUid" value="{{ $cmUid }}">
        @endif
        <div class="mb-2">
            <div class="row">
                <div class="col-4 pr-0">
                    <label class="mb-1 text-sm text-secondary text-left">Pro</label>
                    <select class="form-control form-control-sm w-100" name="proUid" provider-search data-pro-uid="{{ @$entry ? $entry->pro->uid : ($pro ? $pro->uid : '') }}"
                            required>
                        <option value="">-- Select Pro --</option>
                    </select>
                </div>
                <div class="col-4 pr-0">
                    <?php
                    $sD = strtotime($cmStartDate);
                    $y = date('Y', $sD);
                    $m = date('m', $sD);
                    $d = date('t', $sD);
                    $yCurrent = date('Y');
                    $mCurrent = date('m');
                    $isToday = false;
                    if($y === $yCurrent && $m === $mCurrent) {
                        $d = date('d');
                        $isToday = true;
                    }
                    ?>
                    <label class="mb-1 text-sm text-secondary text-left">Date</label>
                    <input autofocus type="date" min="{{ date($y . '-' . $m . '-01') }}" max="{{ date($y . '-' . $m . '-' . $d) }}"
                           value="{{@$entry ? $entry->effective_date : (@$defaultDate ?: $cmEndDate)}}"
                           class="form-control form-control-sm w-100" name="effectiveDate"
                           placeholder="Effective Date" required>
                </div>
                <div class="col-4">
                    <label class="mb-1 text-sm text-secondary text-left">Minutes</label>
                    <select name="timeInSeconds" class="form-control form-control-sm min-width-unset" required>
                        <option value="">-- select --</option>
                        @for($i = 0; $i <= 20; $i++)
                            <option value="{{$i * 60}}" {{@$defaultMins && $defaultMins == $i ? 'selected' : ''}}>{{$i}} min{{$i !== 1 ? 's' : ''}}</option>
                        @endfor
                    </select>
                </div>
            </div>
        </div>
        <div class="mb-2 border border-info p-2 mt-2 bg-light text-left">
            <span><i class="fa fa-phone rotateh text-dark mr-1"></i>This time entry involved interactive communication (audio, video, or in-person) with the patient and/or caretaker.</span>
            <div class="d-flex border-top mt-2">
                <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                    <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" {{((@$entry && $entry->did_pro_interact_with_client_about_rm) || @$defaultInteracted) ? 'checked' : ''}} required>
                    <span>Yes</span>
                </label>
                <label class="mt-2 mb-0 d-inline-flex align-items-center">
                    <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="false" {{((@$entry && $entry->did_pro_interact_with_client_about_rm) || @$defaultInteracted) ? '' : 'checked' }} required>
                    <span>No</span>
                </label>
            </div>
        </div>
        <div class="mb-2">
            <div class="row">
                <div class="col-12">
                    <div cm-rte data-name="contentText">{!! @$entry ? $entry->content_text : (@$defaultComment ?: 'Reviewed/managed patient measurements') !!}</div>
                </div>
            </div>
        </div>
        <div class="d-flex align-items-center">
            <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
        </div>
    </form>
</div>
