@if($pro && $pro->pro_type === 'ADMIN')
    <div class="mb-2 min-width-300px">
        <label for="" class="text-secondary text-sm">Company Pro</label>
        <div class="p-2 border bg-light rounded">{{$genericCompanyPro->pro->displayName()}} / {{$genericCompanyPro->company->name}}</div>
    </div>
@endif
<input type="hidden" name="genericCompanyProUid" value="{{$genericCompanyPro->uid}}">
@if(@$note)
    <input type="hidden" name="optionalNoteUid" value="{{$note->uid}}">
@endif
@if(@$patient)
    <input type="hidden" name="optionalClientUid" value="{{$patient->uid}}">
@endif
@if(@$entityType)
    <input type="hidden" name="genericTargetEntityType" value="{{$entityType}}">
@endif
@if(@$entityUid)
    <input type="hidden" name="genericTargetEntityUid" value="{{$entityUid}}">
@endif
@if(count($genericRates) === 1)
    <input type="hidden" name="code"
           data-entity-type="{{$entityType}}"
           data-amount="{{ $genericRates[0]->amount }}"
           value="{{$genericRates[0]->code}}">
    <p class="mb-2">Service: <br><b>{{ $genericRates[0]->code }} (${{ $genericRates[0]->amount }}/hr)</b></p>
@else
    <div class="mb-2">
        <label for="" class="text-secondary text-sm">Service</label>
        <select autofocus class="form-control" name="code"
                data-entity-type="{{$entityType}}"
                onchange="switchGenericRate(this)">
            <option value="">-- Select Code --</option>
            @foreach($genericPro->genericRates() as $genericRate)
                <option data-amount="{{ $genericRate->amount }}" value="{{ $genericRate->code }}">
                    {{ $genericRate->code }} (${{ $genericRate->amount }})
                </option>
            @endforeach
        </select>
    </div>
@endif
<div class="mb-2">
    <?php
    if(!@$maxMinutes) {
        $maxMinutes = 240;
    }
    ?>
    <label for="" class="text-secondary text-sm">Minutes</label>
    <div class="mb-2">
        <select name="numberOfUnits" class="form-control form-control-sm"
                onchange="calculateGenericBillAmount(this)">
            <option value=""> -- select -- </option>
            <?php for ($i = 5; $i <= $maxMinutes; $i+=5) { ?>
            <option value="{{ $i/60 }}">{{ $i }} minutes</option>
            <?php } ?>
        </select>
    </div>
    <div class="mb-2" calculated-generic-amount></div>
</div>
@if($entityType !== 'Note')
    <div class="mb-2">
        <label for="" class="text-secondary text-sm">Description</label>
        <input type="text" name="genericDescription" class="form-control form-control-sm" value="">
    </div>
@endif
<div class="mb-2">
    <label for="" class="text-secondary text-sm">Effective Date</label>
    <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
</div>
