<h3>Endereço</h3>
<div class="mb-3">
    <label for="address" class="form-label text-bold">Endereço: <span class="span-admin-create">*</span></label>
    <input type="text" class="form-control @error('address') is-invalid @enderror" name="address" id="address" autocomplete="off" value="{{ old('address') }}">
                            @error('address')
        <small class="text-danger text-bold">{{ $message }}</small>
    @enderror
</div>

<div class="mb-3">
    <label for="map" class="form-label text-bold">Localização (Link Google Maps): <span class="span-admin-create">*</span></label>
    <textarea class="form-control @error('map') is-invalid @enderror" name="map" id="map">{{ old('map') }}</textarea>
                            @error('map')
        <small class="text-danger text-bold">{{ $message }}</small>
    @enderror
</div>
<hr>
<div class="mb-3">
    <label for="domicilio" class="form-label text-bold">Tipo de imóvel: <span class="span-admin-create">*</span></label>
    <select class="form-control @error('domicilio') is-invalid @enderror" name="domicilio" id="domicilio">
        @foreach(App\Enums\StatusDomicilio::cases() as $status)
            <option value="{{ $status->name }}" {{ old('domicilio') == $status->name ? 'selected' : '' }}>
                {{ $status->value }}
            </option>
        @endforeach
    </select>
    @error('domicilio')
        <small class="text-danger text-bold">{{ $message }}</small>
    @enderror
</div>
<div class="mb-3">
    <label for="cep" class="form-label">CEP: <span class="span-admin-create">*</span></label>
    <input type="hidden" name="latitude" id="latitude" value="{{ old('latitude') }}">
    <input type="hidden" name="longitude" id="longitude" value="{{ old('longitude') }}">
    <input type="text" class="form-control @error('cep') is-invalid @enderror" name="cep" id="zipCode" oninput="aplicarMascaraCEP(this)" autocomplete="off" value="{{ old('cep') }}">
    @error('cep')
        <small class="text-danger">{{ $message }}</small>
    @enderror
</div>
<div class="mb-3">
    <label for="logradouro" class="form-label">Logradouro: <span class="span-admin-create">*</span></label>
    <input type="text" class="form-control @error('logradouro') is-invalid @enderror" name="logradouro" id="street" autocomplete="off" value="{{ old('logradouro') }}">
                    @error('logradouro')
        <small class="text-danger">{{ $message }}</small>
    @enderror
</div>
<div class="mb-3">
    <label for="numero" class="form-label">Número:</label>
    <input type="text" class="form-control @error('numero') is-invalid @enderror" name="numero" id="numero" value="{{ old('numero') }}">
                    @error('numero')
        <small class="text-danger">{{ $message }}</small>
    @enderror
</div>
<div class="mb-3">
    <label for="complemento" class="form-label">Complemento:</label>
    <input type="text" class="form-control" name="complemento" id="complemento" value="{{ old('complemento') }}">
</div>
<div class="mb-3">
    <label for="cidade" class="form-label">Cidade: <span class="span-admin-create">*</span></label>
    <input type="text" class="form-control @error('cidade') is-invalid @enderror" name="cidade" id="city" autocomplete="off" value="{{ old('cidade') }}">
                    @error('cidade')
        <small class="text-danger">{{ $message }}</small>
    @enderror
</div>
<div class="mb-3">
    <label for="bairro" class="form-label">Bairro: <span class="span-admin-create">*</span></label>
    <input type="text" class="form-control @error('bairro') is-invalid @enderror" name="bairro" id="neighborhood" autocomplete="off" value="{{ old('bairro') }}">
                    @error('bairro')
        <small class="text-danger">{{ $message }}</small>
    @enderror
</div>
<div class="mb-3">
    <label for="uf" class="form-label">UF: <span class="span-admin-create">*</span></label>
    <input type="text" class="form-control @error('uf') is-invalid @enderror" name="uf" id="state" maxlength="2" autocomplete="off" value="{{ old('uf') }}">
                    @error('uf')
        <small class="text-danger">{{ $message }}</small>
    @enderror
</div>
