<?php defined('ABSPATH') || die('Cheatin\' uh?');?>


<div id="strb_wrap" class="strb_overview">
        <div id="strb_content" class="d-flex flex-row bg-white my-0 p-0 m-0">
            <?php $view->show_view('Blocks/Menu'); ?>
        </div>
</div>  


<div style="width:100%;height:800px;position:absolute;top:0px;background-color:#F4F4F4;top:0px;">

<div  style="position:relative;top:120px;min-height:800px;width:53vw;margin-left:28vw;padding-top:20px;background-color:white;">

    <div style="height:65px;background-color:#033;color:white;font-size:30px;font-weight:600;position:absolute;width:100%;top:-62px;right:0px;border-top-left-radius:7px;border-top-right-radius:7px;bottom:30px;">
        <span style="position:relative;top:7px;left:25px;">Display Options</span>
    </div>

    <link rel="stylesheet" href="<?php echo _STRB_THEME_DIR_.'css/myStyle.css'?>" >

    <div style="background-color:white;margin-left:1vw;top:30px;width:36vw;">
        <form method="POST" class="display-options-form-f-t-s" enctype="multipart/form-data">
    
        <div style="margin-left:20px;">
            <p style="font-size:25px;font-weight:500;">Load Starbox In:</p>
            <div  style="display:flex;">
            <label class="toggler-wrapper style-1">   
            <input type="checkbox" <?php echo STRB_Classes_Helpers_Tools::getOption('allPost')=='true' ? 'checked' : ''; ?> name="extra_field_check" class="strb-switch all-post-types"  />
            <div class="toggler-slider">
                <div class="toggler-knob" ></div>
            </div>
            </label>
            <label style="margin-top:-7px;margin-left:15px;font-weight:500;">All</label>
        </div>
     
        <div  style="display:flex;margin-top:20px;">
            <label class="toggler-wrapper style-1">
            <input type="hidden" name="strb_option" value="0"/>
            <input type="checkbox" <?php echo STRB_Classes_Helpers_Tools::getOption('specificPost')=='true' ? 'checked' : ''; ?>  name="extra_field_check" class="strb-switch add-specific-post-types" />
            <div class="toggler-slider">
                <div class="toggler-knob"></div>
            </div>
            </label>
            <label style="margin-top:-7px;margin-left:15px;font-weight:500;">Specific Wordpress post types</label>
        </div>

            <div class="specific-pos specific-posts<?php  echo STRB_Classes_Helpers_Tools::getOption('specificPost')?>" style="margin-top:20px;width:470px;gap:15px;min-height:200px;flex-wrap:wrap;">
            <?php
                $types = get_post_types();
                    foreach ($types as $type) {
                        $type_data = get_post_type_object($type);
                        if (!isset($type_data->show_ui) || $type_data->show_ui != 1) {
                            unset($types[$type]);
                        } else {?>
                        <div  style="display:flex;margin-top:10px;width:200px;">
                            <label class="toggler-wrapper style-1 specific-toggler">
                                <input type="hidden" name="strb_option" value="0"/>
                                <input type="checkbox" value="<?php echo $type ?>" <?php if(STRB_Classes_Helpers_Tools::getOption('field-check')!=null) echo  in_array($type,STRB_Classes_Helpers_Tools::getOption('field-check')) ? 'checked' : ''; ?>  name="<?php echo $type_data->labels->name; ?>" class="abh_post_types strb-switch add-specific-pages" />
                
                                <div class="toggler-slider">
                                    <div class="toggler-knob" style="margin-top:-3px;"></div>
                                </div>
                            </label>
                            <label style="margin-top:-7px;margin-left:15px;font-weight:500;"><?php echo $type_data->labels->name; ?></label>
                        </div> 
                        <?php
                        }
                }?>
                </div>

            <h3 style="font-size:25px;font-weight:500;">Default Author Box:</h3>
                <div class="preview-img" style="">
                    <?php 
                        $STB_user_data = new STRB_Models_ThemeUserData();
                        $id=STRB_Classes_Helpers_Tools::getOption('strb_user_id');
                        $STB_user_data->loadThemeDataByID($id);
                        $theme= $STB_user_data->getData('user_theme');
                        $img = $STB_user_data->getData('background_img');
                        echo STRB_Classes_ObjController::getClass('STRB_Classes_FrontController')->getThemeViewImg($id,$theme,$img,TRUE);?>
                </div>
           
                <div style="height:150px;margin-top:20px;width:100px;margin-left:190px;">
                    <input type="hidden" name="finish" value="finish"/> 
                    <button type="submit" class="btn rounded-2 btn-primary btn-lg py-2 px-5 finish-f-t-s" style="border:none;border-radius:0px;margin-top:60px;background-color:#033;" ><?php echo esc_html__("Save and finish", 'squirrly-seo'); ?></button>
                </div>
        </div>
        </form>
            
        
        <div>
            <form method="POST" enctype="multipart/form-data">
                <?php STRB_Classes_Helpers_Tools::setNonce('strb_settings_prev_to_themes', 'strb_nonce'); ?>
                <input type="hidden" name="action" value="strb_settings_prev_to_themes"/>     
                <link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>

                <div style="margin-top:-90px;margin-left:15px;">
                    <button type="submit" style="border:none;border-radius:0px;display:flex;align-items:center;background-color:#fbcc34;color:black;border:none;font-weight:600;" class="btn rounded-2 btn-primary btn-lg py-2 px-5"><i class="bx bx-chevron-left" style="font-weight:500;margin-left:10px;margin-top:3px;"><span></i><?php echo esc_html__("Back", 'squirrly-seo'); ?></span></button>
                </div>
            </form>    
        </div>    
</br>
</div>
</div>
