<?php if (isset($component)) { $__componentOriginal91fdd17964e43374ae18c674f95cdaa3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal91fdd17964e43374ae18c674f95cdaa3 = $attributes; } ?>
<?php $component = App\View\Components\AdminLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AdminLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="container px-6 mx-auto">
        <h2 class="my-6 text-2xl font-semibold text-gray-700">
            Email Settings
        </h2>

        <?php if (isset($component)) { $__componentOriginal6912374916afbfe53350098c2f0b0678 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal6912374916afbfe53350098c2f0b0678 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.session-status','data' => ['class' => 'mb-4','status' => session('status'),'errors' => $errors]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('session-status'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'mb-4','status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(session('status')),'errors' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal6912374916afbfe53350098c2f0b0678)): ?>
<?php $attributes = $__attributesOriginal6912374916afbfe53350098c2f0b0678; ?>
<?php unset($__attributesOriginal6912374916afbfe53350098c2f0b0678); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6912374916afbfe53350098c2f0b0678)): ?>
<?php $component = $__componentOriginal6912374916afbfe53350098c2f0b0678; ?>
<?php unset($__componentOriginal6912374916afbfe53350098c2f0b0678); ?>
<?php endif; ?>

        <!-- Email Settings Form -->
        <div class="p-6 bg-white rounded-lg shadow-md">
            <form action="<?php echo e(route('admin.settings.email.update')); ?>" method="POST" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <?php echo method_field('PUT'); ?>
                
                <div class="grid gap-6 mb-8 md:grid-cols-2">
                    <!-- SMTP Settings -->
                    <div class="p-6 bg-white rounded-lg border border-gray-200">
                        <h4 class="mb-6 text-lg font-semibold text-gray-700">
                            SMTP Configuration
                        </h4>
                        
                        <!-- Mail Mailer -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Mail Driver
                            </label>
                            <select
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_mailer"
                            >
                                <option value="smtp" <?php echo e(setting('mail_mailer') === 'smtp' ? 'selected' : ''); ?>>SMTP</option>
                                <option value="sendmail" <?php echo e(setting('mail_mailer') === 'sendmail' ? 'selected' : ''); ?>>Sendmail</option>
                            </select>
                        </div>

                        <!-- Mail Host -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Mail Host
                            </label>
                            <input
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_host"
                                value="<?php echo e(old('mail_host', setting('mail_host'))); ?>"
                                placeholder="smtp.mailtrap.io"
                            />
                        </div>

                        <!-- Mail Port -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Mail Port
                            </label>
                            <input
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_port"
                                value="<?php echo e(old('mail_port', setting('mail_port'))); ?>"
                                placeholder="2525"
                                type="number"
                            />
                        </div>

                        <!-- Mail Username -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Mail Username
                            </label>
                            <input
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_username"
                                value="<?php echo e(old('mail_username', setting('mail_username'))); ?>"
                            />
                        </div>

                        <!-- Mail Password -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Mail Password
                            </label>
                            <input
                                type="password"
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_password"
                                value="<?php echo e(old('mail_password', setting('mail_password'))); ?>"
                            />
                        </div>

                        <!-- Mail Encryption -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Mail Encryption
                            </label>
                            <select
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_encryption"
                            >
                                <option value="tls" <?php echo e(setting('mail_encryption') === 'tls' ? 'selected' : ''); ?>>TLS</option>
                                <option value="ssl" <?php echo e(setting('mail_encryption') === 'ssl' ? 'selected' : ''); ?>>SSL</option>
                                <option value="null" <?php echo e(setting('mail_encryption') === null ? 'selected' : ''); ?>>None</option>
                            </select>
                        </div>
                    </div>

                    <!-- Email Settings & Templates -->
                    <div class="p-6 bg-white rounded-lg border border-gray-200">
                        <h4 class="mb-6 text-lg font-semibold text-gray-700">
                            Email Settings & Templates
                        </h4>

                        <!-- Mail From Address -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                From Address
                            </label>
                            <input
                                type="email"
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_from_address"
                                value="<?php echo e(old('mail_from_address', setting('mail_from_address'))); ?>"
                                placeholder="noreply@example.com"
                            />
                        </div>

                        <!-- Mail From Name -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                From Name
                            </label>
                            <input
                                class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                name="mail_from_name"
                                value="<?php echo e(old('mail_from_name', setting('mail_from_name'))); ?>"
                                placeholder="Your Company Name"
                            />
                        </div>

                        <!-- Email Header Logo -->
                        <div class="mb-6">
                            <label class="block mb-2 text-sm font-medium text-gray-700">
                                Email Header Logo
                            </label>
                            <div class="flex items-center space-x-4">
                                <?php if(setting('email_header_logo')): ?>
                                    <div class="flex-shrink-0">
                                        <img src="<?php echo e(asset(setting('email_header_logo'))); ?>" alt="Email Header Logo" class="h-12 w-auto">
                                    </div>
                                <?php endif; ?>
                                <input
                                    type="file"
                                    class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent bg-white text-gray-700"
                                    name="email_header_logo"
                                />
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Notification Settings -->
                <div class="p-6 mb-6 bg-white rounded-lg border border-gray-200">
                    <h4 class="mb-6 text-lg font-semibold text-gray-700">
                        Notification Settings
                    </h4>

                    <div class="grid gap-6 md:grid-cols-3">
                        <!-- Notify on User Registration -->
                        <label class="flex items-center space-x-3">
                            <input
                                type="checkbox"
                                class="w-5 h-5 text-purple-600 border-gray-300 rounded focus:ring-purple-500"
                                name="notify_admin_on_user_register"
                                value="1"
                                <?php echo e(setting('notify_admin_on_user_register') ? 'checked' : ''); ?>

                            >
                            <span class="text-sm text-gray-700">
                                Notify on User Registration
                            </span>
                        </label>

                        <!-- Notify on KYC Submission -->
                        <label class="flex items-center space-x-3">
                            <input
                                type="checkbox"
                                class="w-5 h-5 text-purple-600 border-gray-300 rounded focus:ring-purple-500"
                                name="notify_admin_on_kyc_submission"
                                value="1"
                                <?php echo e(setting('notify_admin_on_kyc_submission') ? 'checked' : ''); ?>

                            >
                            <span class="text-sm text-gray-700">
                                Notify on KYC Submission
                            </span>
                        </label>

                        <!-- Notify on KYC Approval -->
                        <label class="flex items-center space-x-3">
                            <input
                                type="checkbox"
                                class="w-5 h-5 text-purple-600 border-gray-300 rounded focus:ring-purple-500"
                                name="notify_user_on_kyc_approval"
                                value="1"
                                <?php echo e(setting('notify_user_on_kyc_approval') ? 'checked' : ''); ?>

                            >
                            <span class="text-sm text-gray-700">
                                Notify User on KYC Approval
                            </span>
                        </label>
                    </div>
                </div>

                <!-- Submit Button -->
                <div class="flex justify-end">
                    <button
                        type="submit"
                        class="px-6 py-2 text-sm font-medium text-white bg-purple-600 rounded-lg hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2"
                    >
                        Save Email Settings
                    </button>
                </div>
            </form>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal91fdd17964e43374ae18c674f95cdaa3)): ?>
<?php $attributes = $__attributesOriginal91fdd17964e43374ae18c674f95cdaa3; ?>
<?php unset($__attributesOriginal91fdd17964e43374ae18c674f95cdaa3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal91fdd17964e43374ae18c674f95cdaa3)): ?>
<?php $component = $__componentOriginal91fdd17964e43374ae18c674f95cdaa3; ?>
<?php unset($__componentOriginal91fdd17964e43374ae18c674f95cdaa3); ?>
<?php endif; ?><?php /**PATH /home/cypherva/public_html/resources/views/admin/settings/email.blade.php ENDPATH**/ ?>