<?php

// START PRICING SECTION 
    $wp_customize->add_section('luzuk_them_premium_pricing_section',array('title' => __( 'Pricing Section', 'Luzuk Premium' ),'panel' => 'luzuk_them_premium_home_panel'));
    // ENABLE/DISABLE PRISING SECTION
    $wp_customize->add_setting('luzuk_them_premium_pricing_section_disable',array('sanitize_callback' => 'luzuk_them_sanitize_text',));
    $wp_customize->add_control(
        new luzuk_them_Switch_Control(
            $wp_customize,
            'luzuk_them_premium_pricing_section_disable',
            array(
                'settings' => 'luzuk_them_premium_pricing_section_disable',
                'section' => 'luzuk_them_premium_pricing_section',
                'label' => __( 'Disable Section', 'Luzuk Premium' ),
                'on_off_label'  => array('on' => __( 'Yes', 'Luzuk Premium' ), 'off' => __( 'No', 'Luzuk Premium' )),
            )
        )
    );

  

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


 //Section Padding   
lzCustomLable($wp_customize, 'pricingsection_padding', 'luzuk_them_premium_pricing_section', ' Section Padding Setting:');

$wp_customize->add_setting(
    'pricingsection_toppadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '5em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'pricingsection_toppadding',
    array(
        'settings'      => 'pricingsection_toppadding',
        'section'       => 'luzuk_them_premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'pricingsection_bottompadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '5em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'pricingsection_bottompadding',
    array(
        'settings'      => 'pricingsection_bottompadding',
        'section'       => 'luzuk_them_premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'pricingsection_leftpadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'pricingsection_leftpadding',
    array(
        'settings'      => 'pricingsection_leftpadding',
        'section'       => 'luzuk_them_premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Section Left Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'pricingsection_rightpadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'pricingsection_rightpadding',
    array(
        'settings'      => 'pricingsection_rightpadding',
        'section'       => 'luzuk_them_premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Section Right Padding', 'luzuk-premium' )
    )
);



    $wp_customize->add_setting('luzuk_them_pricing_title_heading',array('sanitize_callback' => 'luzuk_them_sanitize_text'));
    $wp_customize->add_control(
        new luzuk_them_Customize_Heading(
            $wp_customize,
            'luzuk_them_pricing_title_heading',
            array(
                'settings'      => 'luzuk_them_pricing_title_heading',
                'section'       => 'luzuk_them_premium_pricing_section',
                'label'         => __( 'Pricing Title & Sub Title', 'Luzuk Premium' ),
            )
        )
    );    



$wp_customize->add_setting('luzuk_them_package_sub_title',array('sanitize_callback'=>'luzuk_them_sanitize_text','default'=> __('Price', 'Luzuk Premium')));


    $wp_customize->add_control(
        'luzuk_them_package_sub_title',
        array(
            'settings' =>'luzuk_them_package_sub_title',
            'section' => 'luzuk_them_premium_pricing_section',
            'type'=> 'text',
            'label'=> __('Section Title', 'Luzuk Premium')
        )
    );

// Heading color
addColorPalatOption($wp_customize, 'PriceSec_HeadingColor', 'luzuk_them_premium_pricing_section', 'Section Heading color', '#111111');

// Heading border color
addColorPalatOption($wp_customize, 'PriceSecHeadborderColor', 'luzuk_them_premium_pricing_section', 'Heading border color', '#fc6e58');




    $wp_customize->add_setting('luzuk_them_pricing_npp_heading',array('sanitize_callback' => 'luzuk_them_sanitize_text'));
    $wp_customize->add_control(
        new luzuk_them_Customize_Heading(
            $wp_customize,
            'luzuk_them_pricing_npp_heading',
            array(
                'settings'      => 'luzuk_them_pricing_npp_heading',
                'section'       => 'luzuk_them_premium_pricing_section',
                'label'         => __( 'Number Of Pricing Plans', 'Luzuk Premium' ),
            )
        )
    );    
    $wp_customize->add_setting('luzuk_them_pricing_npp_count',array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => 2));
    $wp_customize->add_control(
        'luzuk_them_pricing_npp_count',
        array(
            'settings'      => 'luzuk_them_pricing_npp_count',
            'section'       => 'luzuk_them_premium_pricing_section',
            'type'          => 'select',
            'label'         => __( 'Number of plan to show', 'Luzuk Premium' ),
            'choices'=>array(1,2,3)
        )
    );

    for($i=1;$i<=3;$i++){
        $wp_customize->add_setting('luzuk_them_pricing_plan_heading_'.$i,array('sanitize_callback' => 'luzuk_them_sanitize_text'));
        $wp_customize->add_control(
            new luzuk_them_Customize_Heading(
                $wp_customize,
                'luzuk_them_pricing_plan_heading_'.$i,
                array(
                    'settings' => 'luzuk_them_pricing_plan_heading_'.$i,
                    'section' => 'luzuk_them_premium_pricing_section',
                    'label' => __( 'Select Plan'.$i, 'Luzuk Premium' ),
                )
            )
        ); 
        $wp_customize->add_setting('luzuk_them_pricing_plan_name_'.$i,array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => __( 'Basic', 'Luzuk Premium' )));
        $wp_customize->add_control(
            'luzuk_them_pricing_plan_name_'.$i,
            array(
                'settings' => 'luzuk_them_pricing_plan_name_'.$i,
                'section' => 'luzuk_them_premium_pricing_section',
                'type' => 'text',
                'label' => __( 'Plan Name', 'Luzuk Premium' )
            )
        );





        $wp_customize->add_setting('luzuk_them_pricing_plan_unit_'.$i,array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => __( '$', 'Luzuk Premium' )));
        $wp_customize->add_control(
            'luzuk_them_pricing_plan_unit_'.$i,
            array(
                'settings' => 'luzuk_them_pricing_plan_unit_'.$i,
                'section' => 'luzuk_them_premium_pricing_section',
                'type' => 'text',
                'label' => __( 'Plan Price Unit', 'Luzuk Premium' )
            )
        );
       
         $wp_customize->add_setting('luzuk_them_pricing_plan_price_'.$i,array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => __( '15', 'Luzuk Premium' )));
        $wp_customize->add_control(
            'luzuk_them_pricing_plan_price_'.$i,
            array(
                'settings' => 'luzuk_them_pricing_plan_price_'.$i,
                'section' => 'luzuk_them_premium_pricing_section',
                'type' => 'text',
                'label' => __( 'Plan Price', 'Luzuk Premium' )
            )
        );



    $wp_customize->add_setting('luzuk_them_pricing_plan_start_'.$i,array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => __( 'USD/MONTHS', 'Luzuk Premium' )));
        $wp_customize->add_control(
            'luzuk_them_pricing_plan_start_'.$i,
            array(
                'settings' => 'luzuk_them_pricing_plan_start_'.$i,
                'section' => 'luzuk_them_premium_pricing_section',
                'type' => 'text',
                'label' => __( 'Plan Start Label', 'Luzuk Premium' )
            )
        );

         $wp_customize->add_setting('luzuk_them_pricing_plan_content_'.$i,array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => __( '<ul><li>Consctetuer adipiscing elit.</li><li>Lorem ipsum dolor sit amet</li><li>Consctetuer adipiscing elit.</li> <li>Lorem ipsum dolor sit amet</li><li>Consctetuer adipiscing elit.</li><li>Lorem ipsum dolor sit amet</li></ul>', 'Luzuk Premium' )));
        $wp_customize->add_control(
            'luzuk_them_pricing_plan_content_'.$i,
            array(
                'settings' => 'luzuk_them_pricing_plan_content_'.$i,
                'section' => 'luzuk_them_premium_pricing_section',
                'type' => 'textarea',
                'label' => __( 'Plan Content', 'Luzuk Premium' )
            )
        );

        lzAddElement($wp_customize, 'pricing_plan_url_'.$i, 'luzuk_them_premium_pricing_section', $type = 'text', $label="Add Link for plan".$i."&nbsp;if plan selected", $callback ='esc_url', $default='Add link here');

    /*code for button text*/
    $wp_customize->add_setting(
        'luzuk_them_pricing_page_button_title_'.$i,
        array(
            'sanitize_callback'=>'luzuk_them_sanitize_text',
            'default'=> __('Select Plan', 'lz-fitness-premium')
        )
    );
    $wp_customize->add_control(
        'luzuk_them_pricing_page_button_title_'.$i,
        array(
            'settings' =>'luzuk_them_pricing_page_button_title_'.$i,
            'section' => 'luzuk_them_premium_pricing_section',
            'type'=> 'text',
            'label'=> __('Button Text', 'lz-fitness-premium')
        )
    );

    }
    // EDN PRICING SECTION 
    // $wp_customize->add_setting('luzuk_them_pricing_shortcode', array('sanitize_callback'=>'luzuk_them_sanitize_text'));
    // $wp_customize->add_control(
    //     new luzuk_them_Info_Text( 
    //         $wp_customize,
    //         'luzuk_them_pricing_shortcode',
    //         array(
    //             'settings'      => 'luzuk_them_pricing_shortcode',
    //             'section'       => 'luzuk_them_premium_pricing_section',
    //             'label'         => __( 'Note:', 'Luzuk Premium' ), 
    //             'description'   => __( 'Just place the shortcode <strong>"[PLAN_PRICING]"</strong> in your page to show the Pricing in a page ', 'Luzuk Premium' ),
    //         )
    //     )
    // );

// title color
addColorPalatOption($wp_customize, 'luzuk_them_plantitleColor', 'luzuk_them_premium_pricing_section', 'Plan Title color', '#ffffff');

// title color
addColorPalatOption($wp_customize, 'luzuk_them_plantitlebgColor', 'luzuk_them_premium_pricing_section', 'Plan Title Background color', '#ff6c5a');

// title color
addColorPalatOption($wp_customize, 'luzuk_them_boxhoverplantitlebgColor', 'luzuk_them_premium_pricing_section', 'Pricing Box Hover Plan Title Background color', '#362c2d');

// title color
addColorPalatOption($wp_customize, 'AmountPRIplantitleColor', 'luzuk_them_premium_pricing_section', 'Amount Pricing color', '#fb6d57');


// title color
addColorPalatOption($wp_customize, 'boxhoveAmountPRIplantitleColor', 'luzuk_them_premium_pricing_section', 'Pricing Box Hover Amount color', '#382c30');


// title color
addColorPalatOption($wp_customize, 'plansubtitleColor', 'luzuk_them_premium_pricing_section', 'Amount Icon & Sub Title color', '#000000');

// title color 
addColorPalatOption($wp_customize, 'plansubboxtextColor', 'luzuk_them_premium_pricing_section', 'Plan Text color', '#8e8e8e');

// title color 
addColorPalatOption($wp_customize, 'plansubboxtextborderColor', 'luzuk_them_premium_pricing_section', 'Plan Text Border color', '#dcdcdc');


// title color
addColorPalatOption($wp_customize, 'planbutttexiconColor', 'luzuk_them_premium_pricing_section', 'Button Text & Icon color', '#ffffff');

// title color
addColorPalatOption($wp_customize, 'planbutTonbGColor', 'luzuk_them_premium_pricing_section', 'Button Background color', '#fe6b59');


// title color
addColorPalatOption($wp_customize, 'planbuthoverttexiconColor', 'luzuk_them_premium_pricing_section', 'Button Hover Text & Icon color', '#ffffff');

// title color
addColorPalatOption($wp_customize, 'planbuthoverTonbGColor', 'luzuk_them_premium_pricing_section', 'Button Background color', '#362c2d');

// title color
addColorPalatOption($wp_customize, 'PricingboxbGColor', 'luzuk_them_premium_pricing_section', 'Pricing Box Background color', '#f6f6f6');




