<?php
/**
 * Theme Options.
 *
 * @package Prime Spa Center
 */

$default = prime_spa_center_get_default_theme_options();

// Add Panel.
$wp_customize->add_panel( 'theme_option_panel',
	array(
	'title'      => __( 'Theme Options', 'prime-spa-center' ),
	'priority'   => 30,
	'capability' => 'edit_theme_options',
	)
);

// Typography Setting Title
$wp_customize->add_section('prime_spa_center_typography_setting', 
	array(    
	'title'       => __('Typography Settings', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

 // Array of fonts to choose from
    $font_choices = array(
        ''               => __('Select', 'prime-spa-center'),
        'arial'          => 'Arial, sans-serif',
        'verdana'        => 'Verdana, sans-serif',
        'helvetica'      => 'Helvetica, sans-serif',
        'times-new-roman'=> '"Times New Roman", serif',
        'georgia'        => 'Georgia, serif',
        'courier-new'    => '"Courier New", monospace',
        'trebuchet-ms'   => '"Trebuchet MS", sans-serif',
        'tahoma'         => 'Tahoma, sans-serif',
        'palatino'       => '"Palatino Linotype", serif',
        'garamond'       => 'Garamond, serif',
        'impact'         => 'Impact, sans-serif',
        'comic-sans-ms'  => '"Comic Sans MS", cursive, sans-serif',
        'lucida-sans'    => '"Lucida Sans Unicode", sans-serif',
        'arial-black'    => '"Arial Black", sans-serif',
        'gill-sans'      => '"Gill Sans", sans-serif',
        'segoe-ui'       => '"Segoe UI", sans-serif',
        'open-sans'      => '"Open Sans", sans-serif',
        'roboto'         => 'Roboto, sans-serif',
        'lato'           => 'Lato, sans-serif',
        'montserrat'     => 'Montserrat, sans-serif',
        'libre-baskerville' => 'Libre Baskerville',
    );

    // Heading Font Setting
    $wp_customize->add_setting('prime_spa_center_heading_font_family', array(
        'default'           => '',
        'sanitize_callback' => 'prime_spa_center_sanitize_select',
    ));
    $wp_customize->add_control('prime_spa_center_heading_font_family', array(
        'type'    => 'select',
        'choices' => $font_choices,
        'label'   => __('Select Font for Heading', 'prime-spa-center'),
        'section' => 'prime_spa_center_typography_setting',
    ));

    // Body Font Setting
    $wp_customize->add_setting('prime_spa_center_body_font_family', array(
        'default'           => '',
        'sanitize_callback' => 'prime_spa_center_sanitize_select',
    ));
    $wp_customize->add_control('prime_spa_center_body_font_family', array(
        'type'    => 'select',
        'choices' => $font_choices,
        'label'   => __('Select Font for Body', 'prime-spa-center'),
        'section' => 'prime_spa_center_typography_setting',
    ));

// Single Post Setting Title
$wp_customize->add_section('section_single_post_setting', 
	array(    
	'title'       => __('Single Post Setting', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

//Author Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_author_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_author_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_author_setting]',
    array(
        'label'       => __( 'Show Author', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Date Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_date_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_date_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_date_setting]',
    array(
        'label'       => __( 'Show Date', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Categories Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_categories_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_categories_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_categories_setting]',
    array(
        'label'       => __( 'Show Categories', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Comments Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_comment_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_comment_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_comment_setting]',
    array(
        'label'       => __( 'Show Comments', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Post Pagination Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_single_page_pagination_setting]', 
    array(
        'default'           => $default['prime_spa_center_single_page_pagination_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_single_page_pagination_setting]',
    array(
        'label'       => __( 'Show Post Pagination', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Post Content Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_single_page_content_setting]', 
    array(
        'default'           => $default['prime_spa_center_single_page_content_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_single_page_content_setting]',
    array(
        'label'       => __( 'Show Post Content', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Tags Content Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_single_tags_setting]', 
    array(
        'default'           => $default['prime_spa_center_single_tags_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_single_tags_setting]',
    array(
        'label'       => __( 'Show Tags', 'prime-spa-center' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Post Setting
$wp_customize->add_section('section_post_setting', 
	array(    
	'title'       => __('Post Setting', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

//Title Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_title_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_title_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_title_setting]',
    array(
        'label'       => __( 'Show Title', 'prime-spa-center' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//meta Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_meta_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_meta_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_meta_setting]',
    array(
        'label'       => __( 'Show Meta', 'prime-spa-center' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Content Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_content_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_content_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_content_setting]',
    array(
        'label'       => __( 'Show Content', 'prime-spa-center' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Button Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_button_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_button_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_button_setting]',
    array(
        'label'       => __( 'Show Button', 'prime-spa-center' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Featured Image Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_post_feature_image_setting]', 
    array(
        'default'           => $default['prime_spa_center_post_feature_image_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_post_feature_image_setting]',
    array(
        'label'       => __( 'Show Featured Image', 'prime-spa-center' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting('prime_spa_center_single_post_align',array(
    'default' => 'left-align',
    'sanitize_callback' => 'prime_spa_center_sanitize_choices'
));
$wp_customize->add_control('prime_spa_center_single_post_align',array(
    'type' => 'select',
    'label' => __('Archive Post Alignment','prime-spa-center'),
    'section' => 'section_post_setting',
    'choices' => array(
            'left-align' => __('Left Alignment','prime-spa-center'),
            'right-align' => __('Right Alignment','prime-spa-center'),
            'center-align' => __('Center Alignment','prime-spa-center'),
        ),
) );

$wp_customize->add_setting('prime_spa_center_post_meta_order', array(
    'default' => array('featured-image','heading', 'author', 'content','button'),
    'sanitize_callback' => 'prime_spa_center_sanitize_sortable',
));
$wp_customize->add_control(new Prime_Spa_Center_Control_Sortable($wp_customize, 'prime_spa_center_post_meta_order', array(
    'label' => esc_html__('Post Meta Ordering', 'prime-spa-center'),
    'description' => __('Drag & drop post items to rearrange the ordering ( this control will not function by post format )', 'prime-spa-center') ,
    'section' => 'section_post_setting',
    'choices' => array(
        'featured-image' => __('featured-image', 'prime-spa-center') ,
        'heading' => __('heading', 'prime-spa-center') ,
        'author' => __('author', 'prime-spa-center') ,
        'content' => __('content', 'prime-spa-center') ,
        'button' => __('button', 'prime-spa-center') ,
    ) ,
)));

// Page Title
$wp_customize->add_section('section_page_title', 
	array(    
	'title'       => __('Page Title', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

// Show / Hide Page Title
$wp_customize->add_setting( 'theme_options[show_page_title]', array(
	'default'           => $default['show_page_title'],
	'sanitize_callback' => 'prime_spa_center_sanitize_select',
) );

$wp_customize->add_control( 'theme_options[show_page_title]', array(
	'label'              => esc_html__( 'Display Page Title', 'prime-spa-center' ),
	'section'            => 'section_page_title',
	'type'               => 'select',
	'choices' 	         => array(		
		'page-title-enable' 	 => 'Yes',						
		'page-title-disable'     => 'No',
	),	
) );

    // Sidebar Layout
    $wp_customize->add_section('section_sidebar_layout', array(    
    'title'       => __('Sidebar Layout', 'prime-spa-center'),
    'panel'       => 'theme_option_panel'    
    ));


    $wp_customize->add_setting('prime_spa_center_post_layout_setting', array(
        'default'           => 'right-sidebar',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('prime_spa_center_post_layout_setting', array(
        'label'    => __('Post Column Settings', 'prime-spa-center'),
        'section'  => 'section_sidebar_layout',
        'settings' => 'prime_spa_center_post_layout_setting',
        'type'     => 'select',
        'choices'  => array(
            'one-column'   => __('One Column', 'prime-spa-center'),
            'right-sidebar'   => __('Right Sidebar', 'prime-spa-center'),
            'left-sidebar'   => __('Left Sidebar', 'prime-spa-center'),
            'three-column'   => __('Three Columns', 'prime-spa-center'),
            'four-column'   => __('Four Columns', 'prime-spa-center'),
            'grid-layout'   => __('Grid Layout', 'prime-spa-center')
        ),
    ));

    $wp_customize->add_setting('prime_spa_center_archive_pagination_alignment',array(
        'default' => 'left-align',
        'sanitize_callback' => 'prime_spa_center_sanitize_pagination_alignment'
    ));
    $wp_customize->add_control('prime_spa_center_archive_pagination_alignment',array(
        'type' => 'select',
        'label' => __('Pagination Alignment','prime-spa-center'),
        'section' => 'section_sidebar_layout',
        'choices' => array(
            'right-align' => __('Right Alignment','prime-spa-center'),
            'center-align' => __('Center Alignment','prime-spa-center'),
            'left-align' => __('Left Alignment','prime-spa-center'),
        ),
    ) );

// Excerpt Length
$wp_customize->add_section('section_excerpt_length', 
	array(    
	'title'       => __('Excerpt Length', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

$wp_customize->add_setting( 'theme_options[excerpt_length]', array(
	'default'           => $default['excerpt_length'],
	'sanitize_callback' => 'prime_spa_center_sanitize_number_range',
) );
$wp_customize->add_control( 'theme_options[excerpt_length]', array(
	'label'       => esc_html__( 'Excerpt Length', 'prime-spa-center' ),
	'section'     => 'section_excerpt_length',
	'type'        => 'number',
	'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 80px;' ),
) );

// Blog Settings
$wp_customize->add_section('section_blog_setting', 
	array(    
	'title'       => __('Blog / Archive Settings', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

// Blog Title
$wp_customize->add_setting( 'theme_options[your_latest_posts_title]',
	array(
	'default'           => $default['your_latest_posts_title'],
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'prime_spa_center_sanitize_textarea_content',
	'transport'         => 'refresh',
	)
);
$wp_customize->add_control( 'theme_options[your_latest_posts_title]',
	array(
	'label'    => __( 'Blog Title', 'prime-spa-center' ),
	'section'  => 'section_blog_setting',
	'type'     => 'text',
	)
);

// Blog Button Label
$wp_customize->add_setting( 'theme_options[readmore_text]',
	array(
	'default'           => $default['readmore_text'],
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'prime_spa_center_sanitize_textarea_content',
	'transport'         => 'refresh',
	)
);

$wp_customize->add_control( 'theme_options[readmore_text]',
	array(
	'label'    => __( 'Button Label', 'prime-spa-center' ),
	'section'  => 'section_blog_setting',
	'type'     => 'text',
	)
);

// Footer Setting Section starts
$wp_customize->add_section('section_footer', 
	array(    
	'title'       => __('Footer Setting', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

// Footer Copyright Setting control 
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_footer_setting]', 
    array(
        'default'           => $default['prime_spa_center_footer_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

//Footer Widgets Setting control
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_footer_widgtes_setting]', 
    array(
        'default'           => $default['prime_spa_center_footer_widgtes_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_footer_widgtes_setting]',
    array(
        'label'       => __( 'Show Footer Widgets', 'prime-spa-center' ),
        'section'     => 'section_footer',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_footer_setting]',
    array(
        'label'       => __( 'Show Footer Copyright', 'prime-spa-center' ),
        'section'     => 'section_footer',
        'type'        => 'checkbox',
    )
);

// Setting copyright_text.
$wp_customize->add_setting( 'theme_options[copyright_text]',
	array(
	'default'           => $default['copyright_text'],
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'sanitize_text_field',
	'transport'         => 'refresh',
	)
);
$wp_customize->add_control( 'theme_options[copyright_text]',
	array(
	'label'    => __( 'Copyright Text', 'prime-spa-center' ),
	'section'  => 'section_footer',
	'type'     => 'text',
	'priority' => 100,
	)
);
$wp_customize->add_section('prime_spa_center_footer_widgets_section', array(
    'title' => __('Footer Widget Columns', 'prime-spa-center'),
    
));

// Add Setting for Footer Widget Columns
$wp_customize->add_setting('prime_spa_center_footer_widget_columns', array(
    'default' => '4',
    'sanitize_callback' => 'sanitize_text_field',
));

// Add Control for Footer Widget Columns
$wp_customize->add_control('prime_spa_center_footer_widget_columns', array(
    'label' => __('Number of Columns', 'prime-spa-center'),
    'section' => 'section_footer',
    'type' => 'select',
    'choices' => array(
    	'0' => __('None', 'prime-spa-center'),
        '1' => __('1 Column', 'prime-spa-center'),
        '2' => __('2 Columns', 'prime-spa-center'),
        '3' => __('3 Columns', 'prime-spa-center'),
        '4' => __('4 Columns', 'prime-spa-center'),
    ),
));
/* Footer Background Color*/
$wp_customize->add_setting(
    'footer_bg_color',
    array(
        'default' => '',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(
    new WP_Customize_Color_Control(
        $wp_customize,
        'footer_bg_color',
        array(
            'label' => __('Footer Widget Area Background Color', 'prime-spa-center'),
            'section' => 'section_footer',
            'type' => 'color',
        )
    )
);

/** Footer Background Image **/

$wp_customize->add_setting('prime_spa_center_footer_background_image', array(
    'default' => '',
    'transport' => 'refresh',
    'sanitize_callback' => 'esc_url_raw', // Sanitize as URL
));

$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'prime_spa_center_footer_background_image', array(
    'label' => __('Footer Background Image', 'prime-spa-center'),
    'section' => 'section_footer',
    'settings' => 'prime_spa_center_footer_background_image',
)));

/** Footer Background Image Attachment */
$wp_customize->add_setting('prime_spa_center_background_attatchment', array(
    'default'           => 'scroll',
    'sanitize_callback' => 'prime_spa_center_sanitize_choices',
));

$wp_customize->add_control('prime_spa_center_background_attatchment', array(
    'label'    => __('Footer Background Attachment', 'prime-spa-center'),
    'section'  => 'section_footer',
    'settings' => 'prime_spa_center_background_attatchment',
    'type'     => 'select',
    'choices'  => array(
        'fixed' => __('fixed','prime-spa-center'),
        'scroll' => __('scroll','prime-spa-center'),
    ),
));

// 404 PAGE SETTINGS
$wp_customize->add_section(
    'prime_spa_center_404_section',
    array(
        'title' => __( '404 Page Settings', 'prime-spa-center' ),
        'panel'       => 'theme_option_panel'
    )
);

$wp_customize->add_setting('404_page_image', array(
    'default' => '',
    'transport' => 'refresh',
    'sanitize_callback' => 'esc_url_raw', // Sanitize as URL
));

$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, '404_page_image', array(
    'label' => __('404 Page Image', 'prime-spa-center'),
    'section' => 'prime_spa_center_404_section',
    'settings' => '404_page_image',
)));

$wp_customize->add_setting('404_pagefirst_header', array(
    'default' => __('404', 'prime-spa-center'),
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_text_field', // Sanitize as text field
));

$wp_customize->add_control('404_pagefirst_header', array(
    'type' => 'text',
    'label' => __('Heading', 'prime-spa-center'),
    'section' => 'prime_spa_center_404_section',
));

// Setting for 404 page header
$wp_customize->add_setting('404_page_header', array(
    'default' => __('Sorry, that page can\'t be found!', 'prime-spa-center'),
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_text_field', // Sanitize as text field
));

$wp_customize->add_control('404_page_header', array(
    'type' => 'text',
    'label' => __('Heading', 'prime-spa-center'),
    'section' => 'prime_spa_center_404_section',
));


// General Setting Section starts
$wp_customize->add_section('section_general_setting', 
	array(    
	'title'       => __('General Setting', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

/** Scroll to top control */
$wp_customize->add_setting( 
    'theme_options[header_donate_scroll_to_top]', 
    array(
        'default'           => $default['header_donate_scroll_to_top'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[header_donate_scroll_to_top]',
    array(
        'label'       => __( 'Show Scroll To Top', 'prime-spa-center' ),
        'section'     => 'section_general_setting',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting('prime_spa_center_scroll_top_alignment',array(
    'default' => 'right-align',
    'sanitize_callback' => 'prime_spa_center_sanitize_scroll_top_alignment'
));
$wp_customize->add_control('prime_spa_center_scroll_top_alignment',array(
    'type' => 'select',
    'label' => __('Scroll Top Alignment','prime-spa-center'),
    'section' => 'section_general_setting',
    'choices' => array(
        'right-align' => __('Right Alignment','prime-spa-center'),
        'center-align' => __('Center Alignment','prime-spa-center'),
        'left-align' => __('Left Alignment','prime-spa-center'),
    ),
) );

/** Scroll to top button shape */
$wp_customize->add_setting('prime_spa_center_scroll_to_top_radius', array(
    'default'           => 'curved-box',
    'sanitize_callback' => 'prime_spa_center_sanitize_choices',
));

$wp_customize->add_control('prime_spa_center_scroll_to_top_radius', array(
    'label'    => __('Scroll Top Button Shape', 'prime-spa-center'),
    'section'  => 'section_general_setting',
    'settings' => 'prime_spa_center_scroll_to_top_radius',
    'type'     => 'select',
    'choices'  => array(
        'box'        => __( 'Box', 'prime-spa-center' ),
        'curved-box' => __( 'Curved Box', 'prime-spa-center' ),
        'circle'     => __( 'Circle', 'prime-spa-center' ),
    ),
));

// Preloader Setting control 
$wp_customize->add_setting( 
    'theme_options[header_donate_preloader_setting]', 
    array(
        'default'           => $default['header_donate_preloader_setting'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[header_donate_preloader_setting]',
    array(
        'label'       => __( 'Show Preloader', 'prime-spa-center' ),
        'section'     => 'section_general_setting',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting('prime_spa_center_loader_layout_setting', array(
    'default' => 'load',
    'sanitize_callback' => 'sanitize_text_field',
));

// Add control for loader layout
$wp_customize->add_control('prime_spa_center_loader_layout_control', array(
    'label' => __('Preloader Layout', 'prime-spa-center'),
    'section' => 'section_general_setting',
    'settings' => 'prime_spa_center_loader_layout_setting',
    'type' => 'select',
    'choices' => array(
        'load' => __('Preloader 1', 'prime-spa-center'),
        'load-one' => __('Preloader 2', 'prime-spa-center'),
        'ctn-preloader' => __('Preloader 3', 'prime-spa-center'),
    ),
));

/** Sticky Header control */
$wp_customize->add_setting( 
    'theme_options[prime_spa_center_sticky_header]', 
    array(
        'default'           => $default['prime_spa_center_sticky_header'],
        'sanitize_callback' => 'prime_spa_center_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_spa_center_sticky_header]',
    array(
        'label'       => __( 'Show Sticky Header', 'prime-spa-center' ),
        'section'     => 'section_general_setting',
        'type'        => 'checkbox',
    )
);

$wp_customize->add_setting('prime_spa_center_theme_width',array(
    'default' => 'full-width',
    'sanitize_callback' => 'prime_spa_center_sanitize_theme_width'
));
$wp_customize->add_control('prime_spa_center_theme_width',array(
    'type' => 'select',
    'label' => __('Theme Width Option','prime-spa-center'),
    'section' => 'section_general_setting',
    'choices' => array(
        'full-width' => __('Fullwidth','prime-spa-center'),
        'container' => __('Container','prime-spa-center'),
        'container-fluid' => __('Container Fluid','prime-spa-center'),
    ),
) );

//Global Color
$wp_customize->add_section(
    'prime_spa_center_global_color',
    array(
        'title' => esc_html__( 'Global Color Settings', 'prime-spa-center' ),
        'panel'       => 'theme_option_panel'
    )
);

$wp_customize->add_setting('prime_spa_center_primary_color', array(
    'default'           => '#f884b8',
    'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'prime_spa_center_primary_color', array(
    'label'    => __('Theme Primary Color', 'prime-spa-center'),
    'section'  => 'prime_spa_center_global_color',
    'settings' => 'prime_spa_center_primary_color',
))); 

// Woocommerce Setting
$wp_customize->add_section('section_woocommerce_setting', 
	array(    
	'title'       => __('Woocommerce Setting', 'prime-spa-center'),
	'panel'       => 'theme_option_panel'    
	)
);

// Select No Of Columns
$wp_customize->add_setting( 'theme_options[prime_spa_center_archive_product_per_row]', array(
	'default'           => $default['prime_spa_center_archive_product_per_row'],
	'sanitize_callback' => 'prime_spa_center_sanitize_select',
) );

$wp_customize->add_control( 'theme_options[prime_spa_center_archive_product_per_row]', array(
	'label'              => esc_html__( 'Select No Of Columns', 'prime-spa-center' ),
	'section'            => 'section_woocommerce_setting',
	'type'               => 'select',
	'choices' 	         => array(		
		'1' 	  => '1 Column',						
		'2'       => '2 Column',
		'3'       => '3 Column',
		'4'       => '4 Column',
	),	
) );

$wp_customize->add_setting( 
	'theme_options[prime_spa_center_archive_product_per_page]', 
	array(
		'default'              => $default['prime_spa_center_archive_product_per_page'],
		'transport' 		   => 'refresh',
		'sanitize_callback'    => 'prime_spa_center_sanitize_number_absint',
		'sanitize_js_callback' => 'absint',
	)
);

$wp_customize->add_control( 
	'theme_options[prime_spa_center_archive_product_per_page]',
    array(
		'label'       => esc_html__( 'Product Per Page','prime-spa-center' ),
		'section'     => 'section_woocommerce_setting',
		'type'        => 'number',
    )
);

// Homepage Static setting and control.
$wp_customize->add_setting( 'theme_options[enable_frontpage_content]', array(
	'default'             => $default['enable_frontpage_content'],
	'sanitize_callback'   => 'prime_spa_center_sanitize_checkbox',
) );

$wp_customize->add_control( 'theme_options[enable_frontpage_content]', array(
	'label'       	=> __( 'Enable Content', 'prime-spa-center' ),
	'description' 	=> __( 'Click to enable content on static front page only.', 'prime-spa-center' ),
	'section'     	=> 'static_front_page',
	'type'        	=> 'checkbox',
) );

// Show / Hide Frontpage Content
$wp_customize->add_setting( 'theme_options[enable_frontpage_content]', array(
	'default'             => $default['enable_frontpage_content'],
	'sanitize_callback'   => 'prime_spa_center_sanitize_checkbox',
) );

$wp_customize->add_control( 'theme_options[enable_frontpage_content]', array(
	'label'       	=> esc_html__( 'Enable Homepage Content', 'prime-spa-center' ),
	'description' 	=> esc_html__( 'Enable content on A static page.', 'prime-spa-center' ),
	'section'     	=> 'static_front_page',
	'type'        	=> 'checkbox',
) );

// Show / Hide Header Image
$wp_customize->add_setting( 'theme_options[show_header_image]', array(
	'default'           => $default['show_header_image'],
	'sanitize_callback' => 'prime_spa_center_sanitize_select',
) );

$wp_customize->add_control( 'theme_options[show_header_image]', array(
	'label'              => esc_html__( 'Display Header Image', 'prime-spa-center' ),
	'section'            => 'header_image',
	'type'               => 'select',
	'choices' 	         => array(		
		'header-image-enable' 	   => 'Yes',						
		'header-image-disable'     => 'No',
	),	
) );