@extends('layouts.admin')
@section('content')
<div class="page-header"><div class="page-block"><div class="row align-items-center">
    <div class="col-md-12"><ul class="breadcrumb"><li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">হোম</a></li><li class="breadcrumb-item"><a href="javascript: void(0)">সেটিংস</a></li><li class="breadcrumb-item" aria-current="page">Email Config</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Email Configuration') }}</h2></div></div>
</div></div></div>

@include('includes.admin.form-success')
@include('includes.admin.flash-message')

<form action="{{ route('admin.generalsettings.update') }}" id="geniusform" method="POST" enctype="multipart/form-data">
    {{ csrf_field() }}
    <div class="card">
        <div class="card-header"><h5>{{ __('SMTP Settings') }}</h5></div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('SMTP') }} <span class="text-danger">*</span></label>
                    <select class="form-select" name="is_smtp">
                        <option value="1" {{ $data->is_smtp == 1 ? 'selected' : '' }}>{{ __('Activated') }}</option>
                        <option value="0" {{ $data->is_smtp == 0 ? 'selected' : '' }}>{{ __('Deactivated') }}</option>
                    </select>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('Driver') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="driver" value="{{ $data->driver }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('SMTP Host') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="smtp_host" value="{{ $data->smtp_host }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('SMTP Port') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="smtp_port" value="{{ $data->smtp_port }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('Encryption') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="email_encryption" value="{{ $data->email_encryption }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('SMTP Username') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="smtp_user" value="{{ $data->smtp_user }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('SMTP Password') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="smtp_pass" value="{{ $data->smtp_pass }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('From Email') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="from_email" value="{{ $data->from_email }}" required>
                </div>
                <div class="col-md-4 mb-3">
                    <label class="form-label">{{ __('From Name') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="from_name" value="{{ $data->from_name }}" required>
                </div>
            </div>
        </div>
    </div>
    <div class="card"><div class="card-body">
        <button class="btn btn-primary" type="submit"><i class="ti ti-device-floppy me-1"></i>{{ __('Save') }}</button>
    </div></div>
</form>
@endsection
@section('scripts')
<script src="{{asset('assets/admin/js/distawk.js')}}"></script>
@endsection