<x-app-layout>
    @section('title')
        Emails Configurations
    @endsection

    <!-- DataTales Example -->
    <form action="{{ route('admin.email-configurations.update',$data->id) }}" method="post">
        @csrf
        @method('PUT')
        <div class="card shadow mb-4">
            <div class="card-header py-3">
                <h6 class="m-0 font-weight-bold text-primary">
                    Emails Configurations Settings
                </h6>
            </div>
            <div class="card-body">
                <div class="form-group">
                    <label for="type" class="mb-0">Type <span class="text-danger">*</span></label>
                    <select name="type" id="tye" class="form-control">
                        <option value="{{ $data->type }}" selected>SMTP</option>
                    </select>
                    @error('type')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_host" class="mb-0">MAIL HOST <span class="text-danger">*</span></label>
                    <input type="text" value="{{ $data->mail_host }}" name="mail_host" id="mail_host" class="form-control" />
                    @error('mail_host')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_port" class="mb-0">MAIL PORT <span class="text-danger">*</span></label>
                    <input type="number" value="{{ $data->mail_port }}" name="mail_port" id="mail_port" class="form-control" />
                    @error('mail_port')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_username" class="mb-0">MAIL USERNAME <span class="text-danger">*</span></label>
                    <input type="text" value="{{ $data->mail_username }}" name="mail_username" id="mail_username" class="form-control" />
                    @error('mail_username')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_password" class="mb-0">MAIL PASSWORD <span class="text-danger">*</span></label>
                    <input type="text" value="{{ $data->mail_password }}" name="mail_password" id="mail_password" class="form-control" />
                    @error('mail_password')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_encryption" class="mb-0">MAIL ENCRYPTION <span class="text-danger">*</span></label>
                    <input type="text" value="{{ $data->mail_encryption }}" name="mail_encryption" id="mail_encryption" class="form-control" />
                    @error('mail_encryption')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_from_address" class="mb-0">MAIL FROM ADDRESS <span class="text-danger">*</span></label>
                    <input type="text" value="{{ $data->mail_from_address }}" name="mail_from_address" id="mail_from_address" class="form-control" />
                    @error('mail_from_address')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="mail_name" class="mb-0">MAIL FROM NAME <span class="text-danger">*</span></label>
                    <input type="text" value="{{ $data->mail_name }}" name="mail_name" id="mail_name" class="form-control" />
                    @error('mail_name')
                        <span class="text-danger">{{ $message }}</span>
                    @enderror
                </div>
            </div>
            <div class="card-footer text-right">
                <button class="btn btn-primary">Update</button>
            </div>
        </div>
    </form>

</x-app-layout>
