{{-- Dermatology specialty fields, injected into ClinicCore's patient form via
     the SpecialtyDriverRegistry. Receives $patient (ClcPatient|null). --}}
@php
    $dermaProfile = (isset($patient) && $patient)
        ? \Modules\DermatologyClinic\Entities\DermaPatientProfile::where('clc_patient_id', $patient->id)->first()
        : null;
    $dFp = old('fitzpatrick_type', $dermaProfile->fitzpatrick_type ?? '');
    $dSt = old('skin_type', $dermaProfile->skin_type ?? '');
@endphp
<div class="row">
    <div class="col-md-12"><h5 style="margin:6px 0;"><i class="fas fa-hand-dots text-pink"></i> Dermatology</h5><hr style="margin:4px 0 12px;"></div>
    <div class="col-md-6">
        <div class="form-group">
            <label>Fitzpatrick Skin Type</label>
            <select name="fitzpatrick_type" class="form-control">
                <option value="">—</option>
                @foreach(['I'=>'I — Always burns, never tans','II'=>'II — Usually burns','III'=>'III — Sometimes burns','IV'=>'IV — Rarely burns','V'=>'V — Very rarely burns','VI'=>'VI — Never burns'] as $val => $lbl)
                    <option value="{{ $val }}" {{ (string)$dFp === (string)$val ? 'selected' : '' }}>{{ $lbl }}</option>
                @endforeach
            </select>
        </div>
    </div>
    <div class="col-md-6">
        <div class="form-group">
            <label>Skin Type</label>
            <select name="skin_type" class="form-control">
                <option value="">—</option>
                @foreach(['Normal','Oily','Dry','Combination','Sensitive'] as $sk)
                    <option value="{{ $sk }}" {{ (string)$dSt === (string)$sk ? 'selected' : '' }}>{{ $sk }}</option>
                @endforeach
            </select>
        </div>
    </div>
</div>
