<?php
/**
 * Theme Customizer Controls
 *
 * @package somalite
 */


if ( ! function_exists( 'somalite_customizer_header_styles_register' ) ) :
function somalite_customizer_header_styles_register( $wp_customize ) {
     
    //Header Styles
    $wp_customize->add_section(
        'soma_header_styles_settings',
        array (
            'priority'      => 25,
            'capability'    => 'edit_theme_options',
            'theme_supports'=> '',
            'title'         => esc_html__( 'Header Styles', 'somalite' )
        )
    );

    // Title label
    $wp_customize->add_setting( 
        'somalite_label_header_styles_settings', 
        array(
              'sanitize_callback' => 'somalite_sanitize_title',
        ) 
    );

    $wp_customize->add_control( 
        new Somalite_Title_Info_Control( $wp_customize, 'somalite_label_header_styles_settings', 
        array(
            'label'       => esc_html__( 'Header Styles Settings', 'somalite' ),
            'section'     => 'soma_header_styles_settings',
            'type'        => 'somalite-title',
            'settings'    => 'somalite_label_header_styles_settings',
        ) 
    ));
    
    $wp_customize->add_setting(
        'sm_header_styles',
        array(
            'type' => 'theme_mod',
            'default'           => 'style1',
            'sanitize_callback' => 'somalite_sanitize_select'
        )
    );

    $wp_customize->add_control(
        'sm_header_styles',
        array(
            'settings'      => 'sm_header_styles',
            'section'       => 'soma_header_styles_settings',
            'type'          => 'radio',
            'label'         => esc_html__( 'Choose Header Style:', 'somalite' ),
            'description'   => '',
            'choices' => array(
                            'style1' => esc_html__('Default Header Style - This will show default header suitable for general website ', 'somalite'),
                            'style2' => esc_html__('Shop Header Style - This header style will show header suitable for ecommerce website', 'somalite'),
                            ),
        )
    );
    

}
endif;

add_action( 'customize_register', 'somalite_customizer_header_styles_register' );