<?php
/**
 * Createing an oursteps pannel for customizer
 *
 */

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

backgroundManager($wp_customize, 'oursteps', 'luzuk_premium_oursteps', $color='#323232');

lzCustomLable($wp_customize, 'luzuk_sec_ourstepssectionpadding', 'luzuk_premium_oursteps', 'Section Padding');

$wp_customize->add_setting(
    'oursteps_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '1em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'oursteps_areaTpadding',
    array(
        'settings'      => 'oursteps_areaTpadding',
        'section'       => 'luzuk_premium_oursteps',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'oursteps_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '0em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'oursteps_areaBpadding',
    array(
        'settings'      => 'oursteps_areaBpadding',
        'section'       => 'luzuk_premium_oursteps',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);

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

$wp_customize->add_setting(
    'oursteps_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Process steps', 'luzuk' )
    )
);
$wp_customize->add_control(
    'oursteps_title',
    array(
        'settings'      => 'oursteps_title',
        'section'       => 'luzuk_premium_oursteps',
        'type'          => 'text',
        'label'         => __( 'Heading', 'luzuk' )
    )
);

  // Heading Color
addColorPalatOption($wp_customize, 'oursteps_secttlClr', 'luzuk_premium_oursteps', 'Heading Color', '#fff');

$wp_customize->add_setting('luzuk_oursteps_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_oursteps_npp_heading',
        array(
            'settings'      => 'luzuk_oursteps_npp_heading',
            'section'       => 'luzuk_premium_oursteps',
            'label'         => __( 'Number Of Step Plans', 'luzuk' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_oursteps_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'luzuk_oursteps_npp_count',
    array(
        'settings'      => 'luzuk_oursteps_npp_count',
        'section'       => 'luzuk_premium_oursteps',
        'type'          => 'select',
        'label'         => __( 'Number Of Plan To Show', 'luzuk' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 9; $i++ ){
    $wp_customize->add_setting(
        'luzuk_oursteps_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_oursteps_header'.$i,
            array(
                'settings'      => 'luzuk_oursteps_header'.$i,
                'section'       => 'luzuk_premium_oursteps',
                'label'         => __( 'Our Step Box ', 'luzuk' ).$i
            )
        )
    );

    // $wp_customize->add_setting(
    //     'luzuk_oursteps_page_icon'.$i,
    //     array(
    //         'default'           => 'fa fa-user-o',
    //         'sanitize_callback' => 'luzuk_sanitize_text'
    //     )
    // );        
    // $wp_customize->add_control(
    //     new luzuk_Fontawesome_Icon_Chooser(
    //         $wp_customize,
    //         'luzuk_oursteps_page_icon'.$i,
    //         array(
    //             'settings'      => 'luzuk_oursteps_page_icon'.$i,
    //             'section'       => 'luzuk_premium_oursteps',
    //             'type'          => 'icon',
    //             'label'         => __( 'FontAwesome Icon', 'luzuk' ),
    //         )
    //     )
    // );

    $wp_customize->add_setting(
        'steps_title_image'.$i,
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );

    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'steps_title_image'.$i,
            array(
                'section' => 'luzuk_premium_oursteps',
                'settings' => 'steps_title_image'.$i,
                'label' => 'Select Image',
                'description' => __('Recommended Image Size: 150pxX150px', 'luzuk-premium')
            )
        )
    );

lzAddElement($wp_customize, 'luzuk_oursteps_page_title_'.$i, 'luzuk_premium_oursteps', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='MEET CUSTOMERS');

lzAddElement($wp_customize, 'steps_title_text'.$i, 'luzuk_premium_oursteps', $type = 'text', $label="Text", $callback ='luzuk_sanitize_text', $default='There are many variations of passages of Lorem Ipsum');

lzAddElement($wp_customize, 'luzuk_oursteps_page_url_'.$i, 'luzuk_premium_oursteps', $type = 'text', $label="Add Link", $callback ='esc_url', $default='Add link here');

}

lzCustomLable($wp_customize, 'luzuk_ourstepscolor', 'luzuk_premium_oursteps', ' Section Color');

addColorPalatOption($wp_customize, 'oursteps_numClr', 'luzuk_premium_oursteps', 'Number Color', '#000');

addColorPalatOption($wp_customize, 'oursteps_numBGClr', 'luzuk_premium_oursteps', 'Number BG Color', '#FFC400');

addColorPalatOption($wp_customize, 'oursteps_imgbrdClr', 'luzuk_premium_oursteps', 'Image Border Color', '#fff');

addColorPalatOption($wp_customize, 'oursteps_titleClr', 'luzuk_premium_oursteps', 'Title Color', '#fff');

addColorPalatOption($wp_customize, 'oursteps_titlehvClr', 'luzuk_premium_oursteps', 'Title Hover Color', '#FFC400');

addColorPalatOption($wp_customize, 'oursteps_textClr', 'luzuk_premium_oursteps', 'Text Color', '#999999');

addColorPalatOption($wp_customize, 'oursteps_btnarrowclr', 'luzuk_premium_oursteps', 'Arrow Color', '#fff');

lzCustomLable($wp_customize, 'abSec_imgdisplay', 'luzuk_premium_oursteps' , 'Left And Right Side Image Display Setting');

// to show & hide Image
$wp_customize->add_setting( 'step_img_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'step_img_display', array( 'label' => 'Image Display', 'section' => 'luzuk_premium_oursteps', 'settings' => 'step_img_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Image', 'hide' => 'Hide Image', ), ) );