<?php
/* Prohibit direct script loading */
defined('ABSPATH') || die('No direct script access allowed!');
?>
<div id="send_email" class="content-box">
    <div class="ju-settings-option">
        <div class="wpms_row_full">
            <label class="ju-setting-label text"
                   data-tippy="<?php esc_html_e('Enable SMTP send email', 'wpmsPro') ?>">
                <?php esc_html_e('Enable SMTP send email', 'wpmsPro') ?>
            </label>
            <div class="ju-switch-button">
                <label class="switch">
                    <?php if (isset($email_settings['enable']) && (int) $email_settings['enable'] === 1) : ?>
                        <input name="wpms_email_settings[enable]" type="checkbox" id="showSmtpenable"
                               value="1" checked>
                    <?php else : ?>
                        <input name="wpms_email_settings[enable]" type="checkbox" id="showSmtpenable"
                               value="1">
                    <?php endif; ?>
                    <span class="slider round"></span>
                </label>
            </div>
        </div>
    </div>

    <div class="ju-settings-option wpms_width_100 wpms-no-shadow wpms-no-background">
        <div class="ju-settings-option">
            <div class="wpms_row_full">
                <label class="ju-setting-label wpms_width_100 wpms_left"
                       data-tippy="<?php esc_html_e('SMTP Host', 'wpmsPro'); ?>">
                    <?php esc_html_e('SMTP Host', 'wpmsPro') ?>
                </label>
                <p class="p-d-20">
                    <label>
                        <input name="wpms_email_settings[host]" class="wpms_width_100" type="text" id="showSmtpHost"
                               value="<?php echo esc_attr($email_settings['host']) ?>">
                    </label>
                </p>
            </div>
        </div>

        <div class="ju-settings-option">
            <div class="wpms_row_full">
                <label class="ju-setting-label wpms_width_100 wpms_left"
                       data-tippy="<?php esc_html_e('SMTP Port', 'wpmsPro'); ?>">
                    <?php esc_html_e('SMTP Port', 'wpmsPro') ?>
                </label>
                <p class="p-d-20">
                    <label>
                        <input name="wpms_email_settings[port]" class="wpms_width_100" type="text" id="showSmtpPort"
                               value="<?php echo esc_attr($email_settings['port']) ?>">
                    </label>
                </p>
            </div>
        </div>

        <div class="ju-settings-option">
            <div class="wpms_row_full">
                <label class="ju-setting-label wpms_width_100 wpms_left"
                       data-tippy="<?php esc_html_e('SMTP username', 'wpmsPro'); ?>">
                    <?php esc_html_e('SMTP username', 'wpmsPro') ?>
                </label>
                <p class="p-d-20">
                    <label>
                        <input name="wpms_email_settings[username]" class="wpms_width_100" type="text" id="showSmtpUser"
                               value="<?php echo esc_attr($email_settings['username']) ?>">
                    </label>
                </p>
            </div>
        </div>

        <div class="ju-settings-option">
            <div class="wpms_row_full">
                <label class="ju-setting-label wpms_width_100 wpms_left"
                       data-tippy="<?php esc_html_e('SMTP Password', 'wpmsPro'); ?>">
                    <?php esc_html_e('SMTP Password', 'wpmsPro') ?>
                </label>
                <p class="p-d-20">
                    <label>
                        <input name="wpms_email_settings[password]" class="wpms_width_100" type="password"
                               id="showSmtpPass"
                               value="<?php echo esc_attr($email_settings['password']) ?>">
                    </label>
                </p>
            </div>
        </div>

        <div class="ju-settings-option">
            <div class="wpms_row_full">
                <label class="ju-setting-label wpms_width_100 wpms_left"
                       data-tippy="<?php esc_html_e('Type of Encription', 'wpmsPro'); ?>">
                    <?php esc_html_e('Type of Encription', 'wpmsPro') ?>
                </label>
                <p class="p-d-20">
                    <label class="radio m-r-30">
                        <input type="radio" name="wpms_email_settings[type_encryption]" class="wpms-radio"
                               value="none" <?php checked($email_settings['type_encryption'], 'none') ?>>
                        <span class="outer"><span
                                    class="inner"></span></span><?php esc_html_e(' None', 'wpmsPro'); ?>
                    </label>
                    <label class="radio m-r-30">
                        <input type="radio" name="wpms_email_settings[type_encryption]" class="wpms-radio"
                               value="ssl" <?php checked($email_settings['type_encryption'], 'ssl') ?>>
                        <span class="outer"><span
                                    class="inner"></span></span><?php esc_html_e(' SSL', 'wpmsPro'); ?>
                    </label>
                    <label class="radio">
                        <input type="radio" name="wpms_email_settings[type_encryption]" class="wpms-radio"
                               value="tls" <?php checked($email_settings['type_encryption'], 'tls') ?>>
                        <span class="outer"><span
                                    class="inner"></span></span><?php esc_html_e(' TLS', 'wpmsPro'); ?>
                    </label>
                </p>
            </div>
        </div>

        <div class="ju-settings-option">
            <div class="wpms_row_full">
                <label class="ju-setting-label text"
                       data-tippy="<?php esc_html_e('SMTP Authentication', 'wpmsPro') ?>">
                    <?php esc_html_e('SMTP Authentication', 'wpmsPro') ?>
                </label>
                <div class="ju-switch-button">
                    <label class="switch">
                        <?php if (isset($email_settings['autentication']) && $email_settings['autentication'] === 'yes') : ?>
                            <input name="wpms_email_settings[autentication]" type="checkbox" id="showautentication"
                                   value="yes" checked>
                        <?php else : ?>
                            <input name="wpms_email_settings[autentication]" type="checkbox" id="showautentication"
                                   value="yes">
                        <?php endif; ?>
                        <span class="slider round"></span>
                    </label>
                </div>
            </div>
        </div>
    </div>

    <div class="wpms_width_100 wpms_left">
        <button type="button"
                class="wpms_save_settingemail ju-button orange-button waves-effect waves-light"><?php esc_html_e('Save', 'wpmsPro') ?></button>
        <span class="message_saved"><?php esc_html_e('Saved', 'wpmsPro') ?></span>
    </div>
</div>
