<?php
if( ! function_exists( 'travel_tour_register_custom_controls' ) ) :
/**
 * Register Custom Controls
*/
function travel_tour_register_custom_controls( $wp_customize ) {
    
    // Load our custom control.
    require_once get_template_directory() . '/inc/custom-controls/radiobtn/class-radio-buttonset-control.php';
    require_once get_template_directory() . '/inc/custom-controls/radioimg/class-radio-image-control.php';
    require_once get_template_directory() . '/inc/custom-controls/select/class-select-control.php';
    require_once get_template_directory() . '/inc/custom-controls/slider/class-slider-control.php';
    require_once get_template_directory() . '/inc/custom-controls/toggle/class-toggle-control.php';
    require_once get_template_directory() . '/inc/custom-controls/repeater/class-repeater-setting.php';
    require_once get_template_directory() . '/inc/custom-controls/repeater/class-control-repeater.php';
    require_once get_template_directory() . '/inc/custom-controls/sortable/class-sortable-control.php';
    require_once get_template_directory() . '/inc/custom-controls/dropdown-taxonomies/class-dropdown-taxonomies-control.php';
    require_once get_template_directory() . '/inc/custom-controls/posttype-taxonomies/class-post-type-taxonomies-control.php';
    require_once get_template_directory() . '/inc/custom-controls/dropdown-posttype/class-dropdown-posttype-control.php';
    require_once get_template_directory() . '/inc/custom-controls/multicheck/class-multi-check-control.php';

    require_once get_template_directory() . '/inc/custom-controls/notes.php';

    require get_template_directory() . '/inc/custom-controls/upgrade-to-pro/class-section-pro-control.php';
    require get_template_directory() . '/inc/custom-controls/upgrade-to-pro/class-control-upgrade-to-pro.php';
    require_once get_template_directory() . '/inc/custom-controls/text-message/class-text-message-control.php';
    require_once get_template_directory() . '/inc/custom-controls/separator/class-separator-control.php';
            
    // Register the control type.
    $wp_customize->register_control_type( 'Travel_Tour_Radio_Buttonset_Control' );
    $wp_customize->register_control_type( 'Travel_Tour_Radio_Image_Control' );
    $wp_customize->register_control_type( 'Travel_Tour_Select_Control' );
    $wp_customize->register_control_type( 'Travel_Tour_Slider_Control' );
    $wp_customize->register_control_type( 'Travel_Tour_Toggle_Control' );    
    $wp_customize->register_control_type( 'Travel_Tour_Control_Sortable' );
    $wp_customize->register_control_type( 'Travel_Tour_Multi_Check_Control' );
    $wp_customize->register_control_type( 'Travel_Tour_Text_Message_Control' );
    
    $wp_customize->register_section_type( 'Travel_Tour_Customize_Section_Pro_Control' );
    $wp_customize->register_control_type( 'Travel_Tour_Control_Upgrade_To_Pro' );
    $wp_customize->register_control_type( 'Travel_Tour_Separator_Control' );
}
endif;
add_action( 'customize_register', 'travel_tour_register_custom_controls' );

function travel_tour_enqueue_custom_admin_style() {
    wp_register_style( 'travel-tour-upgrade-to-pro', get_template_directory_uri() . '/inc/custom-controls/upgrade-to-pro/upgrade-to-pro.css', false );
    wp_enqueue_style( 'travel-tour-upgrade-to-pro' );

    wp_enqueue_script( 'travel-tour-upgrade-to-pro', get_template_directory_uri() . '/inc/custom-controls/upgrade-to-pro/upgrade-to-pro.js', array( 'jquery' ), false, true );
}
add_action( 'admin_enqueue_scripts', 'travel_tour_enqueue_custom_admin_style' );