@push('js')
    <script src="{{ asset('js/admin/emails.js') }}"></script>
@endpush

@php
    $name = $name ?? 'email';
    $malaDireta = $malaDireta ?? false;
@endphp
<div class="div-emails form-row">
    @foreach ($emails as $i => $email)
        @include('components.email', ['name' => "{$name}[$i]", 'malaDireta' => $malaDireta,
            'valor' => old("$name.$i.endereco") ?? $email->valor, 'malaDiretaChecked' => $email->aceita_mala_direta])
    @endforeach
</div>