<?php 
/**
 * Createing an about us pannel for customizer
 *
 */
// TEAM SECTION START HERE 
/*============TEAM SECTION PANEL============*/
$wp_customize->add_section(
    'lz_fitness_bridesmaid_section',
    array(
        'title'         => __( 'Brides Section', 'gurukul' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
// ENABLE/DISABLE brides SECTION
$wp_customize->add_setting(
    'lz_fitness_bridesmaid_section_disable',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'lz_fitness_bridesmaid_section_disable',
        array(
            'settings'      => 'lz_fitness_bridesmaid_section_disable',
            'section'       => 'lz_fitness_bridesmaid_section',
            'label'         => __( 'Disable Section', 'gurukul' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'gurukul' ),
                'off' => __( 'No', 'gurukul' )
            )   
        )
    )
);

backgroundManager($wp_customize, 'bridesmaid', 'lz_fitness_bridesmaid_section', $color='#f4f3f3');

$wp_customize->add_setting(
    'lz_fitness_brides_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_brides_title_subtitle_heading',
        array(
            'settings'      => 'lz_fitness_brides_title_subtitle_heading',
            'section'       => 'lz_fitness_bridesmaid_section',
            'label'         => __( 'Section Title', 'gurukul' ),
        )
    )
);
$wp_customize->add_setting(
    'lz_fitness_brides_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Bride Family', 'gurukul' )
    )
);
$wp_customize->add_control(
    'lz_fitness_brides_title',
    array(
        'settings'      => 'lz_fitness_brides_title',
        'section'       => 'lz_fitness_bridesmaid_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'gurukul' )
    )
);

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_brides_HeadingColor', 'lz_fitness_bridesmaid_section', 'Heading color', '#2a2a2a');
// Sub Heading color
//addColorPalatOption($wp_customize, 'lz_fitness_team_SubHeadingColor', 'lz_fitness_team_section', 'Sub Heading color', '#5e5e5e');
// Title color
addColorPalatOption($wp_customize, 'lz_fitness_brides_TitleColor', 'lz_fitness_bridesmaid_section', 'Title color', '#2a2a2a');
// Designation color
addColorPalatOption($wp_customize, 'lz_fitness_brides_DesigColor', 'lz_fitness_bridesmaid_section', 'Designation color', '#494949');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_brides_TextColor', 'lz_fitness_bridesmaid_section', 'Text color', '#494949');

$wp_customize->add_setting('lz_fitness_brides_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_brides_npp_heading',
        array(
            'settings'      => 'lz_fitness_brides_npp_heading',
            'section'       => 'lz_fitness_bridesmaid_section',
            'label'         => __( 'Number Of brides to show', 'gurukul' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_brides_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 5));
$wp_customize->add_control(
    'lz_fitness_brides_npp_count',
    array(
        'settings'      => 'lz_fitness_brides_npp_count',
        'section'       => 'lz_fitness_bridesmaid_section',
        'type'          => 'select',
        'label'         => __( 'Number of brides members to show', 'gurukul' ),
        'choices'=>array(1,2,3,4,5,6)
    )
);

// TEAM PAGES
for( $i = 1; $i <= 6; $i++ ){
    $wp_customize->add_setting(
        'lz_fitness_brides_heading'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_brides_heading'.$i,
            array(
                'settings'      => 'lz_fitness_brides_heading'.$i,
                'section'       => 'lz_fitness_bridesmaid_section',
                'label'         => __( 'Brides Member ', 'gurukul' ).$i,
            )
        )
    );
    if(is_array($lzFitnessBridesSingleChoice)){
        $wp_customize->add_setting(
            'lz_fitness_brides_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'lz_fitness_brides_page'.$i,
            array(
                'settings'      => 'lz_fitness_brides_page'.$i,
                'section'       => 'lz_fitness_bridesmaid_section',
                'type'=> 'select',
                'label'         => __( 'Select a Brides', 'gurukul' ),
                'choices' => $lzFitnessBridesSingleChoice,
            )
        );
    }else{
        $wp_customize->add_setting('lz_fitness_bridesmaid_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
        $wp_customize->add_control(
            new lz_fitness_Info_Text( 
                $wp_customize,
                'lz_fitness_bridesmaid_section_lbl'.$i,
                array(
                    'settings'      => 'lz_fitness_bridesmaid_section_lbl'.$i,
                    'section'       => 'lz_fitness_bridesmaid_section',
                    'label'         => __( 'Note:', 'gurukul' ),    
                    'description'   => __( '<strong>Changes will not reflect unless you select the brides member.</strong> <br/>Please add the brides from "Brides menu" and then select brides member to show information.', 'gurukul' ),
                )
            )
        );
    }
}
// Brides SECTION END HERE 