<?php 
/**
 * Createing an about us pannel for customizer
 *
 */

$categories = get_categories(array('hide_empty' => 0));
foreach ($categories as $category) {
    $cat[$category->term_id] = $category->cat_name;
}
// TEAM SECTION START HERE 
/*============TEAM SECTION PANEL============*/
$wp_customize->add_section(
	'featured_area',
	array(
		'title'         => __( 'Featured Section', 'luzuk' ),
		'panel'   => 'luzuk_premium_home_panel',
	)
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
	'featured_area_disable',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new luzuk_Switch_Control(
		$wp_customize,
		'featured_area_disable',
		array(
			'settings'      => 'featured_area_disable',
			'section'       => 'featured_area',
			'label'         => __( 'Disable Section', 'luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'luzuk' ),
				'off' => __( 'No', 'luzuk' )
			)   
		)
	)
);


backgroundManager($wp_customize, 'featured', 'featured_area', $color='#f6faff', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'featured_padding_lbl', 'featured_area', 'Section Padding');

$wp_customize->add_setting(
    'sec_featuredsectionTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '0em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_featuredsectionTpadding',
    array(
        'settings'      => 'sec_featuredsectionTpadding',
        'section'       => 'featured_area',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_featuredsectionBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_featuredsectionBpadding',
    array(
        'settings'      => 'sec_featuredsectionBpadding',
        'section'       => 'featured_area',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'Luzuk' )
    )
);


$wp_customize->add_setting(
    'featured_title_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'featured_title_subtitle_heading',
        array(
            'settings'      => 'featured_title_subtitle_heading',
            'section'       => 'featured_area',
            'label'         => __( 'Section Heading', 'luzuk-premium' ),
        )
    )
);
   

$wp_customize->add_setting(
        'luzuk_featured_title',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'Featured Videos', 'Luzuk' )
        )
    );
    $wp_customize->add_control(
        'luzuk_featured_title',
        array(
            'settings'      => 'luzuk_featured_title',
            'section'       => 'featured_area',
            'type'          => 'text',
            'label'         => __( 'Section Heading', 'Luzuk' )
        )
    );
addColorPalatOption($wp_customize, 'featuredarea_sectitle_color', 'featured_area', 'Heading Color ', '#2e3d62');
addColorPalatOption($wp_customize, 'featuredarea_sectitleborder_color', 'featured_area', 'Heading Border Color ', '#fd8455');

$wp_customize->add_setting(
        'featured_subtitle',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industrys. Lorem Ipsum has industrys.', 'Luzuk' )
        )
    );
    $wp_customize->add_control(
        'featured_subtitle',
        array(
            'settings'      => 'featured_subtitle',
            'section'       => 'featured_area',
            'type'          => 'textarea',
            'label'         => __( 'Section Text', 'Luzuk' )
        )
    );

addColorPalatOption($wp_customize, 'featuredarea_subtext_clr', 'featured_area', 'Section Text Color ', '#838a9b');

lzCustomLable($wp_customize, 'featuredarea_animationdisplay', 'featured_area', 'Section Animation Display Setting:');

// to show & hide another button
$wp_customize->add_setting( 'fea_animation_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'fea_animation_display', array( 'label' => 'Section Animation Display', 'section' => 'featured_area', 'settings' => 'fea_animation_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Slider Animation', 'hide' => 'Hide Slider Animation', ), ) ); 

lzCustomLable($wp_customize, 'featured_tpbutton', 'featured_area', 'Top Button For Section');
// Top button
$wp_customize->add_setting( 'featr_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'featr_button_display', array( 'label' => 'Section Top Button Display', 'section' => 'featured_area', 'settings' => 'featr_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) );

$wp_customize->add_setting(
        'featr_button1',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'View more', 'Luzuk' )
        )
    );
    $wp_customize->add_control(
        'featr_button1',
        array(
            'settings'      => 'featr_button1',
            'section'       => 'featured_area',
            'type'          => 'text',
            'label'         => __( 'Add Button Text Here', 'Luzuk' )
        )
    );
$wp_customize->add_setting('featr_link',   array('default'=> 'add Button link here', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('featr_link',
    array(
        'settings'      => 'featr_link',
        'section'       => 'featured_area',
        'type'          => 'url',
        'label'         => __( 'Add Link For Button:', 'Luzuk' )
    )
);    

addColorPalatOption($wp_customize, 'featr_tpbtntxt_clr', 'featured_area', 'Section Top Button Text Color ', '#2e3d62');

addColorPalatOption($wp_customize, 'featr_tpbtnicn_clr', 'featured_area', 'Section Top Button Icon Color ', '#fd8455');

addColorPalatOption($wp_customize, 'featr_tpbtntxthv_clr', 'featured_area', 'Section Top Button Text & Icon Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'featr_tpbtnbghv_clr', 'featured_area', 'Section Top Button Background Hover Color ', '#fd8455');


lzCustomLable($wp_customize, 'featuredareapost_category', 'featured_area', 'Post Video Category Setting:');

// // ADDING THE CATEGORY TO SELECT
$choices = getPostCategories($isObject = false, $id=0, $isParents = 0);

lzCheckBoxElement($wp_customize, 'post_video_categories', 'featured_area', $choices, $default=0, $label=__('Please select the Categories to show', 'luzuk-premium'));

addColorPalatOption($wp_customize, 'featr_movbx_clr', 'featured_area', 'Section Movie Box Background Color ', '#fff');

addColorPalatOption($wp_customize, 'featr_titl_clr', 'featured_area', 'Section Movie Title Color ', '#2e3d62');

addColorPalatOption($wp_customize, 'featr_Categres_clr', 'featured_area', 'Section Movie Categories Color ', '#fd8455');


lzCustomLable($wp_customize, 'featured_imgbuttonhv', 'featured_area', 'Section Image Hover Button ');

addColorPalatOption($wp_customize, 'featr_hvimgbtnbgclr', 'featured_area', 'Section Image Button Background Color ', '#fd8455');

addColorPalatOption($wp_customize, 'featr_hvimgbtnclr', 'featured_area', 'Section Image Button Color ', '#fff');


lzCustomLable($wp_customize, 'featured_imgbutton', 'featured_area', 'Section Text Button ');

addColorPalatOption($wp_customize, 'featr_imgbtn_clr', 'featured_area', 'Section Text Button Background Color ', '#ee6c4d');

addColorPalatOption($wp_customize, 'featr_imgbtnhv_clr', 'featured_area', 'Section Text Button Background Hover Color ', '#2e3d62');

addColorPalatOption($wp_customize, 'featr_imgbtnicn_clr', 'featured_area', 'Section Text Button Icon Color ', '#fff');
