<?php defined('ABSPATH') or die('No script kiddies please!'); ?>
<div class="wrap wpwab-wrap">
    <div class="wpwab-content-wrap">
        <div class="wpwab-template-setting">
            <div class="wpwab-field-wrap">
                <label><?php _e('Template Layout', wpwab_TD); ?></label>
                <div class="wpwab-field ">
                    <select name="wpwab_settings[button_template]" id="wpwab-button-template-floating" >

                        <?php for ($k = 1; $k <= 18; $k ++) { ?>
                            <option id="wpwab-temp-<?php echo $k; ?>" value="template-<?php echo $k; ?>" <?php echo isset($wpwab_settings['button_template']) && $wpwab_settings['button_template'] == "template-$k" ? "selected='selected'" :''; ?> >
                                <?php _e('Template ', wpwab_TD) ?><?php echo $k; ?>
                            </option>
                        <?php } ?>

                    </select>
                    <div class="wpwab-floating-demo wpwab-preview-image">
                        <?php
                        for ($cnt = 1; $cnt <= 18; $cnt ++) {
                            $template = isset($wpwab_settings['button_template']) && $wpwab_settings['button_template'] != '' ? $wpwab_settings['button_template'] :'template-1';
                                $exploed_array = explode('-', $template);
                                $cnt_num = $exploed_array[1];
                                if ($cnt != $cnt_num) {
                                    $style = "style='display:none;'";
                                } else {
                                    $style = '';
                                }
                            ?>
                            <div class="wpwab-floating-common" id="wpwab-floating-demo-<?php echo $cnt; ?>"  <?php if (isset($style)) echo $style; ?>>
                                <div class="wpwab-border-design">
                                    <img src="<?php echo wpwab_IMG_DIR . '/button/' . 'template-' . $cnt . '.jpg' ?>"/>
                                </div>
                            </div>
                        <?php } ?>
                    </div>
                </div>
            </div>

            <div class="wpwab-field-wrap" >
                <label for="wpwab_button_text_value"><?php _e( 'Button Description Text', wpwab_TD ); ?></label>
                <div class="wpwab-field">
                    <input type="text" name="wpwab_settings[button_description]" id="wpwab_button_description_value" value="<?php echo (isset($wpwab_settings['button_description'])) ? esc_attr($wpwab_settings['button_description']) : ''; ?>" placeholder="Insert Button description"/>
                    <label for="wpwab_button_description_value"></label>
                    <p class="description"><?php _e('Please add description for the button text. Note: This description will only come in affect for templates 12, 13, 15 and 18 respectively if the button text is enabled.', wpwab_TD) ?></p>
                </div>
            </div>
        </div>
    </div>
</div>
