<!-- Signup modal-->
<div id="signup-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <div class="text-center text-dark mt-2 mb-4 fs-4"> Mail</div>
                <form class="ps-3 pe-3" method="POST" action="{{ route('Email.envoyer') }}">
                    @csrf

                    <div class="form-group mb-1">
                        <label for="from">from :</label>
                        <select id="mySelect" name="from" id="from"
                            class="form-control @error('from') is-invalid @enderror">

                            @foreach ($user->company as $company)
                                <option value="{{ $company->id }}">
                                    {{ $company->email_pro }}</option>
                            @endforeach

                        </select>
                        @error('from')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror
                    </div>
                    <div class="form-group mb-1">
                        <label for="to">to :</label>
                        <input type="text" name="to" required
                            class="form-control @error('to') is-invalid @enderror">
                        @error('to')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror
                    </div>
                    <div class="form-group mb-1">
                        <label for="subject">Sujet</label>
                        <input type="text" name="subject" required
                            class="form-control @error('subject') is-invalid @enderror">
                        @error('subject')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror
                    </div>
                    <div class="form-group mb-1">
                        <label for="content">Contenu :</label>
                        <textarea class="form-control @error('content') is-invalid @enderror" name="content" id="" cols="10"
                            rows="5" required>
                        </textarea>

                        @error('content')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror
                    </div>




                    <div class="mb-3 text-center"> <button class="btn btn-success" type="submit">Envoyer</button>
                    </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
