<?php
/**
 * Dental Blocks: Customizer
 *
 * @subpackage Dental Blocks
 * @since 1.0
 */

function dental_blocks_customize_register( $wp_customize ) {

    wp_enqueue_style('customizercustom_css', esc_url( get_template_directory_uri() ). '/inc/customizer/customizer.css');

    // Pro Section
    $wp_customize->add_section('dental_blocks_pro', array(
        'title'    => __('DENTAL PREMIUM', 'dental-blocks'),
        'priority' => 1,
    ));
    $wp_customize->add_setting('dental_blocks_pro', array(
        'default'           => null,
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Dental_Blocks_Pro_Control($wp_customize, 'dental_blocks_pro', array(
        'label'    => __('DENTAL PREMIUM', 'dental-blocks'),
        'section'  => 'dental_blocks_pro',
        'settings' => 'dental_blocks_pro',
        'priority' => 1,
    )));
}
add_action( 'customize_register', 'dental_blocks_customize_register' );


define('DENTAL_BLOCKS_PRO_LINK',__('https://www.ovationthemes.com/products/dental-clinic-wordpress-theme','dental-blocks'));

define('DENTAL_BLOCKS_BUNDLE_BTN',__('https://www.ovationthemes.com/products/wordpress-bundle','dental-blocks'));

/* Pro control */
if (class_exists('WP_Customize_Control') && !class_exists('Dental_Blocks_Pro_Control')):
    class Dental_Blocks_Pro_Control extends WP_Customize_Control{

    public function render_content(){?>
        <label style="overflow: hidden; zoom: 1;">
            <div class="col-md upsell-btn">
                <a href="<?php echo esc_url( DENTAL_BLOCKS_PRO_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE DENTAL PREMIUM','dental-blocks');?> </a>
            </div>
            <div class="col-md">
                <img class="dental_blocks_img_responsive " src="<?php echo esc_url(get_template_directory_uri()); ?>/screenshot.png">
            </div>
            <div class="col-md">
                <ul style="padding-top:10px">
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Responsive Design', 'dental-blocks');?> </li>                 
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Demo Importer', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Section Reordering', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Contact Page Template', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Multiple Blog Layouts', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Unlimited Color Options', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Cross Browser Support', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Detailed Documentation Included', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('WPML Compatible (Translation Ready)', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Woo-commerce Compatible', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Full Support', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('10+ Sections', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('SEO Friendly', 'dental-blocks');?> </li>
                    <li class="upsell-dental_blocks"> <div class="dashicons dashicons-yes"></div> <?php esc_html_e('Supper Fast', 'dental-blocks');?> </li>
                </ul>
            </div>
            <div class="col-md upsell-btn upsell-btn-bottom">
                <a href="<?php echo esc_url( DENTAL_BLOCKS_BUNDLE_BTN ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('WP Theme Bundle (125+ Themes)','dental-blocks');?> </a>
            </div>
        </label>
    <?php } }
endif;