@php
    use App\Support\PaymentCurrency;
    $currencyField = $currencyField ?? 'currency';
    $selectedCurrency = !empty($model) && !empty($model->currency)
        ? PaymentCurrency::resolveForModel($model)
        : PaymentCurrency::normalize(
            old($currencyField, PaymentCurrency::defaultItemCurrency()),
            PaymentCurrency::defaultItemCurrency()
        );
@endphp
<div class="form-group">
    <label class="input-label">{{ trans('admin/main.item_currency') }}</label>
    <select name="{{ $currencyField }}" class="form-control @error($currencyField) is-invalid @enderror">
        @foreach(PaymentCurrency::labels() as $code => $label)
            <option value="{{ $code }}" {{ $selectedCurrency === $code ? 'selected' : '' }}>{{ $label }}</option>
        @endforeach
    </select>
    <div class="text-muted text-small mt-1">
        {{ trans('admin/main.item_currency_hint') }}
        <br>USD: السعر بالدولار — يُحوَّل تلقائياً لجنيه عند الدفع (EasyKash).
    </div>
    @error($currencyField)
    <div class="invalid-feedback">{{ $message }}</div>
    @enderror
</div>
