@php
    $ppCodigoFieldId = $ppCodigoFormFieldId ?? 'pp_programa_codigo';
    $ppNomeFieldId = $ppFormFieldId ?? 'pp_programa_nome';
@endphp
<div class="row g-3">
    <div class="col-md-4">
        <label for="{{ $ppCodigoFieldId }}" class="form-label">{{ __('Código do programa') }}</label>
        <input type="text"
               name="codigo"
               id="{{ $ppCodigoFieldId }}"
               class="form-control @error('codigo') is-invalid @enderror"
               value="{{ old('codigo', $programa->codigo ?? '') }}"
               maxlength="50"
               autocomplete="off"
               placeholder="{{ __('Ex.: 204 ou PROG-01') }}">
        @error('codigo')
            <div class="invalid-feedback">{{ $message }}</div>
        @enderror
    </div>
    <div class="col-md-8">
        <label for="{{ $ppNomeFieldId }}" class="form-label">{{ __('Nome do programa') }} <span class="text-danger">*</span></label>
        <input type="text"
               name="nome"
               id="{{ $ppNomeFieldId }}"
               class="form-control @error('nome') is-invalid @enderror"
               value="{{ old('nome', $programa->nome ?? '') }}"
               maxlength="255"
               required>
        @error('nome')
            <div class="invalid-feedback">{{ $message }}</div>
        @enderror
    </div>
</div>

<div class="d-flex justify-content-end mt-3">
    <button type="submit" class="btn btn-primary">
        <i class="fa-solid fa-save me-1" aria-hidden="true"></i> {{ __('Salvar') }}
    </button>
</div>
