<?php 
 
$wp_customize->add_section(
	'gallery_section',
	array(
		'title'         => __( 'Gallery Section', 'Luzuk' ),
		'panel'   => 'luzuk_premium_home_panel',
	)
);
$wp_customize->add_setting(
	'gallery_section_disable',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new luzuk_Switch_Control(
		$wp_customize,
		'gallery_section_disable',
		array(
			'settings'      => 'gallery_section_disable',
			'section'       => 'gallery_section',
			'label'         => __( 'Disable Section', 'Luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'Luzuk' ),
				'off' => __( 'No', 'Luzuk' )
			)   
		)
	)
);
 

backgroundManager($wp_customize, 'gallery', 'gallery_section', $color='#ffffff');

lzCustomLable($wp_customize, 'gallery_padding', 'gallery_section', 'Section Padding');

$wp_customize->add_setting(
    'secgalleryTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'secgalleryTpadding',
    array(
        'settings'      => 'secgalleryTpadding',
        'section'       => 'gallery_section',
        'type'          => 'text',
        'label'         => __( ' Top ', 'luzuk' )
    )
);
$wp_customize->add_setting(
    'secgalleryBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '6em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'secgalleryBpadding',
    array(
        'settings'      => 'secgalleryBpadding',
        'section'       => 'gallery_section',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk' )
    )
);

    $wp_customize->add_setting(
    'gallery_title_sub_title_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'gallery_title_sub_title_heading',
        array(
            'settings'      => 'gallery_title_sub_title_heading',
        'section'       => 'gallery_section',
            'section'       => 'gallery_section',
            'label'         => __( 'Section Sub Heading & Heading', 'Luzuk' ),
        )
    )
);   

$wp_customize->add_setting(
    'gallery_subheading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Our Gallery', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'gallery_subheading',
    array(
        'settings'      => 'gallery_subheading',
        'section'       => 'gallery_section',
        'type'          => 'text',
        'label'         => __( 'Section Sub Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'gallsec_subhedingclr', 'gallery_section', 'Section Sub Heading Color', '#fff');

addColorPalatOption($wp_customize, 'gallsec_subhedingbgclr', 'gallery_section', 'Section Sub Heading BG Color', '#76B801');

$wp_customize->add_setting(
    'gallery_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'AMAZING ANIMALS YOU CAN SEE', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'gallery_heading',
    array(
        'settings'      => 'gallery_heading',
        'section'       => 'gallery_section',
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'gallsec_hedingclr', 'gallery_section', 'Section Heading Color', '#000');
addColorPalatOption($wp_customize, 'gallsec_hedingbrdclr', 'gallery_section', 'Section Heading Border Color', '#73552E');


$wp_customize->add_setting('gallery_section_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
	new luzuk_Info_Text( 
		$wp_customize,
		'gallery_section_lbl',
		array(
			'settings'		=> 'gallery_section_lbl',
			'section'		=> 'gallery_section',
			'label'			=> __( 'Note:', 'Luzuk' ),	
			'description'	=> __( 'Use Gallery Images Of Equal Height.', 'Luzuk' ),
		)
	)
);
$luzukGallerySingleChoice[] = 'Select';

for( $i = 1; $i <= 12; $i++ ){
	$wp_customize->add_setting(
		'rg_gallery_heading'.$i,
		array(
			'sanitize_callback' => 'luzuk_sanitize_text'
		)
	);
	$wp_customize->add_control(
		new luzuk_Customize_Heading(
			$wp_customize,
			'rg_gallery_heading'.$i,
			array(
				'settings'      => 'rg_gallery_heading'.$i,
				'section'       => 'gallery_section',
				'label'         => __( 'Gallery Image ', 'Luzuk' ).$i, 
			)
		)
	);
	if(is_array($luzukGallerySingleChoice)){
		$wp_customize->add_setting(
			'gallery_page'.$i,
			array(
				'sanitize_callback' => 'absint'
			)
		);
		$wp_customize->add_control(
			'gallery_page'.$i,
			array(
				'settings'      => 'gallery_page'.$i,
				'section'       => 'gallery_section',
				'type'=> 'select',
				'label'         => __( 'Select A Gallery Image', 'Luzuk' ),
				'choices' => $luzukGallerySingleChoice,
			)
		);
	}else{
		$wp_customize->add_setting('gallery_section_lbl'.$i, array('sanitize_callback'=>'luzuk_sanitize_text'));
		$wp_customize->add_control(
			new luzuk_Info_Text( 
				$wp_customize,
				'gallery_section_lbl'.$i,
				array(
					'settings'		=> 'gallery_section_lbl'.$i,
					'section'		=> 'gallery_section',
					'label'			=> __( 'Note:', 'Luzuk' ),	
					'description'	=> __( '<strong>Changes will not reflect unless you select the gallery Image.</strong> <br/>Please add the gallery images from "Gallery menu" and then select gallery Image to show.', 'Luzuk' ),
				)
			)
		);
	}
}

lzCustomLable($wp_customize, 'Gallsec-clr', 'gallery_section', 'Section Color');


addColorPalatOption($wp_customize, 'gallsec_imgolyclr', 'gallery_section', 'Image Overlay Color', '#000');

addColorPalatOption($wp_customize, 'gallsec_icnbgclr', 'gallery_section', 'Icon Bg Color', '#fff');

addColorPalatOption($wp_customize, 'gallsec_icnclr', 'gallery_section', 'Icon Color', '#76B801');

addColorPalatOption($wp_customize, 'gallsec_titleclr', 'gallery_section', 'Title Color', '#fff');