<?php

// START PRICING SECTION 
    $wp_customize->add_section('lz_fitness_premium_pricing_section',array('title' => __( 'Pricing Section', 'gurukul' ),'panel' => 'lz_fitness_premium_home_panel'));
    // ENABLE/DISABLE PRISING SECTION
    $wp_customize->add_setting('lz_fitness_premium_pricing_section_disable',array('sanitize_callback' => 'lz_fitness_sanitize_text',));
    $wp_customize->add_control(
        new lz_fitness_Switch_Control(
            $wp_customize,
            'lz_fitness_premium_pricing_section_disable',
            array(
                'settings' => 'lz_fitness_premium_pricing_section_disable',
                'section' => 'lz_fitness_premium_pricing_section',
                'label' => __( 'Disable Section', 'gurukul' ),
                'on_off_label'  => array('on' => __( 'Yes', 'gurukul' ), 'off' => __( 'No', 'gurukul' )),
            )
        )
    );

    backgroundManager($wp_customize, 'pricing', 'lz_fitness_premium_pricing_section', $color='#fff');

    $wp_customize->add_setting('lz_fitness_pricing_title_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_pricing_title_heading',
            array(
                'settings'      => 'lz_fitness_pricing_title_heading',
                'section'       => 'lz_fitness_premium_pricing_section',
                'label'         => __( 'Pricing Title & Text', 'gurukul' ),
            )
        )
    );    
    $wp_customize->add_setting('lz_fitness_pricing_title',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'Pricing Section', 'gurukul' )));
    $wp_customize->add_control(
        'lz_fitness_pricing_title',
        array(
            'settings'      => 'lz_fitness_pricing_title',
            'section'       => 'lz_fitness_premium_pricing_section',
            'type'          => 'text',
            'label'         => __( 'Title for section', 'gurukul' )
        )
    );
    $wp_customize->add_setting('lz_fitness_pricing_text',array('sanitize_callback'=>'lz_fitness_sanitize_text','default'=> __('Here goes the short description for the section', 'gurukul')));
    $wp_customize->add_control(
        'lz_fitness_pricing_text',
        array(
            'settings' =>'lz_fitness_pricing_text',
            'section' => 'lz_fitness_premium_pricing_section',
            'type'=> 'textarea',
            'label'=> __('Content for the section', 'gurukul')
        )
    );

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_plan_HeadingColor', 'lz_fitness_premium_pricing_section', 'Heading color', $headingColor);
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_plan_TextColor', 'lz_fitness_premium_pricing_section', 'Text color', '#333333');

    $wp_customize->add_setting('lz_fitness_pricing_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_pricing_npp_heading',
            array(
                'settings'      => 'lz_fitness_pricing_npp_heading',
                'section'       => 'lz_fitness_premium_pricing_section',
                'label'         => __( 'Number Of Pricing Plans', 'gurukul' ),
            )
        )
    );    
    $wp_customize->add_setting('lz_fitness_pricing_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 2));
    $wp_customize->add_control(
        'lz_fitness_pricing_npp_count',
        array(
            'settings'      => 'lz_fitness_pricing_npp_count',
            'section'       => 'lz_fitness_premium_pricing_section',
            'type'          => 'select',
            'label'         => __( 'Number of plan to show', 'gurukul' ),
            'choices'=>array(1,2,3,4)
        )
    );

    for($i=1;$i<=4;$i++){
        $wp_customize->add_setting('lz_fitness_pricing_plan_heading_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text'));
        $wp_customize->add_control(
            new lz_fitness_Customize_Heading(
                $wp_customize,
                'lz_fitness_pricing_plan_heading_'.$i,
                array(
                    'settings' => 'lz_fitness_pricing_plan_heading_'.$i,
                    'section' => 'lz_fitness_premium_pricing_section',
                    'label' => __( 'Plan '.$i, 'gurukul' ),
                )
            )
        ); 
        $wp_customize->add_setting('lz_fitness_pricing_plan_name_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'Plan Name', 'gurukul' )));
        $wp_customize->add_control(
            'lz_fitness_pricing_plan_name_'.$i,
            array(
                'settings' => 'lz_fitness_pricing_plan_name_'.$i,
                'section' => 'lz_fitness_premium_pricing_section',
                'type' => 'text',
                'label' => __( 'Plan Name', 'gurukul' )
            )
        );
        $wp_customize->add_setting('lz_fitness_pricing_plan_price_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( '$', 'gurukul' )));
        $wp_customize->add_control(
            'lz_fitness_pricing_plan_price_'.$i,
            array(
                'settings' => 'lz_fitness_pricing_plan_price_'.$i,
                'section' => 'lz_fitness_premium_pricing_section',
                'type' => 'text',
                'label' => __( 'Plan price', 'gurukul' )
            )
        );
        $wp_customize->add_setting('lz_fitness_pricing_plan_content_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( '<ul><li>This is dummy text </li><li>This is dummy text </li><li>This is dummy text </li><li>This is dummy text </li><li>This is dummy text </li><li>This is dummy text </li></ul>', 'gurukul' )));
        $wp_customize->add_control(
            'lz_fitness_pricing_plan_content_'.$i,
            array(
                'settings' => 'lz_fitness_pricing_plan_content_'.$i,
                'section' => 'lz_fitness_premium_pricing_section',
                'type' => 'textarea',
                'label' => __( 'Plan Content', 'gurukul' )
            )
        );
        $wp_customize->add_setting('lz_fitness_pricing_plan_page_'.$i,array('sanitize_callback'=> 'absint','default' => __('Plans Read more Link', 'gurukul')
    )
    );
        $wp_customize->add_control(
            'lz_fitness_pricing_plan_page_'.$i,
            array(
                'settings'=> 'lz_fitness_pricing_plan_page_'.$i,
                'section' => 'lz_fitness_premium_pricing_section',
                'type'=>'select',
                'label'=>__('Link to Plan page', 'gurukul'),
                'choices'=>$lz_fitness_page_choice
            )
        );
    }
    // EDN PRICING SECTION 
    $wp_customize->add_setting('lz_fitness_pricing_shortcode', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
    $wp_customize->add_control(
        new lz_fitness_Info_Text( 
            $wp_customize,
            'lz_fitness_pricing_shortcode',
            array(
                'settings'      => 'lz_fitness_pricing_shortcode',
                'section'       => 'lz_fitness_premium_pricing_section',
                'label'         => __( 'Note:', 'gurukul' ), 
                'description'   => __( 'Just place the shortcode <strong>"[PLAN_PRICING]"</strong> in your page to show the Pricing in a page ', 'gurukul' ),
            )
        )
    );
