<?php defined('ABSPATH') or die('No script kiddies please!!'); 
$ciws_floating_settings = get_option('ciws_floating_settings');
$ciws_main_settings = get_option('ciws_main_settings');

?>

<div class="wrap ciws-wrap">

    <?php include(CIWS_PATH . '/includes/views/backend/account-boxes/account-header.php'); ?>
    <!-- End of header section -->
    <?php
    if (!empty($_GET['message']) && $_GET['message'] == 1) {
        ?>
        <div class="notice notice-info is-dismissible inline">
            <p>
                <?php esc_html_e('Settings saved successfully.', 'chat-in-website'); ?>
            </p>
        </div>
        <?php
    }
    ?>
    <?php include(CIWS_PATH . '/includes/views/backend/floating-icon-boxes/floating-icon-nav.php'); ?>

    <div class="ciws-settings-wrap">

        <form method="post" class="ciws-form" action="<?php echo esc_url(admin_url('admin-post.php')); ?>">
            <?php wp_nonce_field('ciws_floating_icon_settings_nonce', 'ciws_floating_icon_settings_nonce_field'); ?>
            <input type="hidden" name="action" value="ciws_floating_icon_action" />
            <?php
          
            include(CIWS_PATH . '/includes/views/backend/floating-icon-boxes/floating-select-account.php');
            include(CIWS_PATH . '/includes/views/backend/floating-icon-boxes/floating-layout-settings.php');
            


            ?>
            <div class="ciws-field-wrap">

                <div class="ciws-field-wrap  ciws-settings-action">
                    <label></label>
                    <div class="ciws-field">
                        <input type="submit" class="button-primary"
                            value="<?php esc_html_e('Save', 'chat-in-website'); ?>" />
                    </div>
                </div>
            </div>
        </form>
        <?php
         if ($box_status == 'greeting') {
            include(CIWS_PATH . '/includes/views/frontend/ciws-greeting-template.php');
        } 
        elseif ($box_status == 'floating') {
            include(CIWS_PATH . '/includes/views/frontend/ciws-floating-icon-with-box.php');
        } else {
            include(CIWS_PATH . '/includes/views/frontend/ciws-floating-icon.php');
        } ?>
    </div>
</div>