{{-- 7. DİNAMİK ALANLAR --}}
<div class="rcard" id="extraCard" style="{{ empty($extraFields) ? 'display:none' : '' }}">
    <div class="rcard-head">
        <div class="rcard-icon" style="background:#e0f2fe;color:#0284c7"><i
                class="fas fa-sliders-h"></i></div>
        <div class="rcard-title" id="extraTitle">Hizmet Detayları</div>
    </div>
    <div class="rcard-body">
        <div class="fg2" id="extraContainer">
            @foreach($extraFields as $f)
                <div class="fl"><label>{{ $f['label'] }}</label>
                    @if($f['type'] === 'select')
                        <select name="extra_data[{{ $f['key'] }}]" class="fi">
                            <option value="">Seçiniz</option>@foreach($f['options'] as $v => $l)<option
                                value="{{ $v }}" {{ old("extra_data.{$f['key']}") === $v ? 'selected' : '' }}>
                            {{ $l }}</option>@endforeach
                        </select>
                    @elseif($f['type'] === 'boolean')
                        <select name="extra_data[{{ $f['key'] }}]" class="fi">
                            <option value="">Seçiniz</option>
                            <option value="1" {{ old("extra_data.{$f['key']}") === '1' ? 'selected' : '' }}>Evet
                            </option>
                            <option value="0" {{ old("extra_data.{$f['key']}") === '0' ? 'selected' : '' }}>Hayır
                            </option>
                        </select>
                    @else
                        <input type="{{ $f['type'] === 'number' ? 'number' : 'text' }}"
                            name="extra_data[{{ $f['key'] }}]" value="{{ old("extra_data.{$f['key']}") }}"
                            class="fi" placeholder="{{ $f['label'] }}">
                    @endif
                </div>
            @endforeach
        </div>
    </div>
</div>
