<?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'           => __( '0em', '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'           => __( '3em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_featuresBpadding',
    array(
        'settings'      => 'sec_featuresBpadding',
        'section'       => 'features_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk' )
    )
);

$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' => 3));
$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-low-vision',
            '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='QUALITY WORK');


lzAddElement($wp_customize, 'fea_page_text'.$i, 'features_section', $type = 'textarea', $label="Description", $callback ='luzuk_sanitize_text', $default='It is a long established fact that a reader  will be  distracted  by  the readable content of a page .');

// $wp_customize->add_setting(
//         'featurednew_page_button_title_'.$i,
//         array(
//             'sanitize_callback'=>'luzuk_sanitize_text',
//             'default'=> __('Read More', 'luzuk premium')
//         )
//     );
    // $wp_customize->add_control(
    //     'featurednew_page_button_title_'.$i,
    //     array(
    //         'settings' =>'featurednew_page_button_title_'.$i,
    //         'section' => 'features_section',
    //         'type'=> 'text',
    //         'label'=> __('Button Text', 'luzuk premium')
    //     )
    // );

// 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, 'membepageevnbxbg', 'features_section', 'Section Background Color', '#fff');

addColorPalatOption($wp_customize, 'membe_pageicn', 'features_section', 'Section Icon Color', '#718be3');

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

addColorPalatOption($wp_customize, 'membe_pagetxt', 'features_section', 'Section Text Color ', '#4d4d4d');

addColorPalatOption($wp_customize, 'membe_pagecibor', 'features_section', 'Section Circle Border Color ', '#dce9ff');

addColorPalatOption($wp_customize, 'membe_pageciborhv', 'features_section', 'Section Circle Background Color ', '#fff');

addColorPalatOption($wp_customize, 'membe_pageoverlyclr', 'features_section', 'Section Circle overlay Color ', '#dce9ff');
