<?php
/**
 * Createing an Our Pets pannel for customizer
 */

// START ABOUT SECTION 
$wp_customize->add_section(
    'features_section',
    array(
        'title' => __( 'Features Section', 'luzuk-premium' ),
        'panel' => 'luzuk_premium_home_panel'
    )
);
    // ENABLE/DISABLE FEATURED SECTION
$wp_customize->add_setting(
    'features_section_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'features_section_disable',
        array(
            'settings'      => 'features_section_disable',
            'section'       => 'features_section',
            'label'         => __( 'Disable Section', 'luzuk-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk-premium' ),
                'off' => __( 'No', 'luzuk-premium' )
            ),
        )
    )
);

backgroundManager($wp_customize, 'features', 'features_section', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');


lzCustomLable($wp_customize, 'luzuk_featuressectionpadding', 'features_section', 'Section Padding');

$wp_customize->add_setting(
    'sec_featuresTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_featuresTpadding',
    array(
        'settings'      => 'sec_featuresTpadding',
        'section'       => 'features_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_featuresBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_featuresBpadding',
    array(
        'settings'      => 'sec_featuresBpadding',
        'section'       => 'features_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk' )
    )
);


lzCustomLable($wp_customize, 'luzuk_featurheading', 'features_section', 'Section Heading');

    $wp_customize->add_setting(
        'features_maintitle',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'JOIN OUR CLASSES', 'luzuk-premium' )
        )
    );
    $wp_customize->add_control(
        'features_maintitle',
        array(
            'settings'      => 'features_maintitle',
            'section'       => 'features_section',
            'type'          => 'text',
            'label'         => __( 'Section Heading', 'luzuk-premium' )
        )
    );

addColorPalatOption($wp_customize, 'membe_headingclr', 'features_section', 'Section Heading Color', '#000');

addColorPalatOption($wp_customize, 'membe_headingbrdclr', 'features_section', 'Section Heading Border Color', '#eb49b9');

$wp_customize->add_setting('luzuk_featuresslb_section_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'luzuk_featuresslb_section_lbl',
        array(
            'settings'      => 'luzuk_featuresslb_section_lbl',
            'section'       => 'features_section',
            'label'         => __( 'Note:', 'Luzuk' ),    
            'description'   => __( 'Changes will not reflect unless you select an image', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting('luzuk_features_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_features_npp_heading',
        array(
            'settings'      => 'luzuk_features_npp_heading',
            'section'       => 'features_section',
            'label'         => __( 'Number Of features To Show', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_features_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 5));
$wp_customize->add_control(
    'luzuk_features_npp_count',
    array(
        'settings'      => 'luzuk_features_npp_count',
        'section'       => 'features_section',
        'type'          => 'select',
        'label'         => __( 'Number of Section Box to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

//about PAGES
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'luzuk_features_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_features_header'.$i,
            array(
                'settings'      => 'luzuk_features_header'.$i,
                'section'       => 'features_section',
                'label'         => __( 'Section Box ', 'luzuk-premium' ).$i
            )
        )
    );

    lzAddImageElement($wp_customize, 'features_page_icon1'.$i, 'features_section', $label="Recommended Image Size: 290X275px");

// $wp_customize->add_setting(
//         'features_page_icon1'.$i,
//         array(
//             'default'           => 'fa fa-camera',
//             'sanitize_callback' => 'luzuk_sanitize_text'
//         )
//     );        
//     $wp_customize->add_control(
//         new luzuk_Fontawesome_Icon_Chooser(
//             $wp_customize,
//             'features_page_icon1'.$i,
//             array(
//                 'settings'      => 'features_page_icon1'.$i,
//                 'section'       => 'features_section',
//                 'type'          => 'icon',
//                 'label'         => __( 'FontAwesome Icon', 'Luzuk' ),
//             )
//         )
//     );

lzAddElement($wp_customize, 'features_page_title_'.$i, 'features_section', $type = 'text', $label="Section Title", $callback ='luzuk_sanitize_text', $default='Sport Conditioning');

lzAddElement($wp_customize, 'luzuk_features_page_url_'.$i, 'features_section', $type = 'text', $label="Featured Page Link", $callback ='esc_url', $default='Add link here');

}
  
lzCustomLable($wp_customize, 'featurescolor', 'features_section', 'Section Colors');

addColorPalatOption($wp_customize, 'membe_imghv', 'features_section', 'Section Image Hover Color ', '#000');

addColorPalatOption($wp_customize, 'membe_pagettl', 'features_section', 'Section Title Color ', '#fff');

addColorPalatOption($wp_customize, 'membe_pagettlhv', 'features_section', 'Section Title Hover Color ', '#000');

addColorPalatOption($wp_customize, 'membe_pagettlbrd', 'features_section', 'Section Title Border Color ', '#eb49b9');

addColorPalatOption($wp_customize, 'membe_pagettbtnbg', 'features_section', 'Section Slider Button Background Color ', '#5c5a5b');

addColorPalatOption($wp_customize, 'membe_pagettbtnarrow', 'features_section', 'Section Slider Button Arrow Color ', '#eb49b9');

addColorPalatOption($wp_customize, 'membe_pagettbtnarrowhv', 'features_section', 'Section Slider Button Arrow Hover Color ', '#fff');