<?php
$wp_customize->add_section('premium_pricing_section',array('title' => __( 'Pricing Section', 'Luzuk Premium' ),'panel' => 'lz_fitness_premium_home_panel'));
$wp_customize->add_setting('premium_pricing_section_disable',array('sanitize_callback' => 'lz_fitness_sanitize_text',));
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'premium_pricing_section_disable',
        array(
            'settings' => 'premium_pricing_section_disable',
            'section' => 'premium_pricing_section',
            'label' => __( 'Disable Section', 'Luzuk Premium' ),
            'on_off_label'  => array('on' => __( 'Yes', 'Luzuk Premium' ), 'off' => __( 'No', 'Luzuk Premium' )),
        )
    )
);

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





lzCustomLable($wp_customize, 'pricingSectionPaddingSetting', 'premium_pricing_section', 'Section Top & Bottom Padding:');

$wp_customize->add_setting(
    'pricing_areaTpadding', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '8em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'pricing_areaTpadding',
    array(
        'settings'      => 'pricing_areaTpadding',
        'section'       => 'premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'pricing_areaBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '8em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'pricing_areaBpadding',
    array(
        'settings'      => 'pricing_areaBpadding',
        'section'       => 'premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'Luzuk' )
    )
);


$wp_customize->add_setting('princing_area_heading_subtitle',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'princing_area_heading_subtitle',
        array(
            'settings'      => 'princing_area_heading_subtitle',
            'section'       => 'premium_pricing_section',
            'label'         => __( 'Pricing Title, Sub Title & Text', 'Luzuk Premium' ),
        )
    )
);    
$wp_customize->add_setting('princing_area_subtitle',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'HEADING HERE', 'Luzuk Premium' )));
$wp_customize->add_control(
    'princing_area_subtitle',
    array(
        'settings'      => 'princing_area_subtitle',
        'section'       => 'premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Section Sub Title', 'Luzuk Premium' )
    )
);

addColorPalatOption($wp_customize, 'princing_area_subtitle_Color', 'premium_pricing_section', 'Section Sub Title Color', '#56b5f3');


$wp_customize->add_setting('princing_area_title',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'Pricing <span> Plan</span>', 'Luzuk Premium' )));
$wp_customize->add_control(
    'princing_area_title',
    array(
        'settings'      => 'princing_area_title',
        'section'       => 'premium_pricing_section',
        'type'          => 'text',
        'label'         => __( 'Section Title', 'Luzuk Premium' )
    )
);

addColorPalatOption($wp_customize, 'princing_area_title_Color', 'premium_pricing_section', 'Section Title Color', '#212121');
addColorPalatOption($wp_customize, 'princing_area_titleborder_Color', 'premium_pricing_section', 'Section Title Border Color', '#56b5f3');

$wp_customize->add_setting('princing_area_content',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eu pharetra ex. Etiam eget diam ligula..', 'Luzuk Premium' )));
$wp_customize->add_control(
    'princing_area_content',
    array(
        'settings'      => 'princing_area_content',
        'section'       => 'premium_pricing_section',
        'type'          => 'textarea',
        'label'         => __( 'Section Content', 'Luzuk Premium' )
    )
);
addColorPalatOption($wp_customize, 'princing_area_sectiontxt_Color', 'premium_pricing_section', 'Section Content Color', '#4e4e4e');


$wp_customize->add_setting('pricing_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'pricing_npp_heading',
        array(
            'settings'      => 'pricing_npp_heading',
            'section'       => 'premium_pricing_section',
            'label'         => __( 'Number Of Pricing Plans', 'Luzuk Premium' ),
        )
    )
);    
$wp_customize->add_setting('pricing_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 2));
$wp_customize->add_control(
    'pricing_npp_count',
    array(
        'settings'      => 'pricing_npp_count',
        'section'       => 'premium_pricing_section',
        'type'          => 'select',
        'label'         => __( 'Number of plan to show', 'Luzuk Premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

for($i=1;$i<=12;$i++){
    $wp_customize->add_setting('pricing_plan_heading_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text'));
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'pricing_plan_heading_'.$i,
            array(
                'settings' => 'pricing_plan_heading_'.$i,
                'section' => 'premium_pricing_section',
                'label' => __( 'Plan'.$i, 'Luzuk Premium' ),
            )
        )
    ); 
    $wp_customize->add_setting('pricing_plan_name_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'Basic', 'Luzuk Premium' )));
    $wp_customize->add_control(
        'pricing_plan_name_'.$i,
        array(
            'settings' => 'pricing_plan_name_'.$i,
            'section' => 'premium_pricing_section',
            'type' => 'text',
            'label' => __( 'Plan Name', 'Luzuk Premium' )
        )
    );


    $wp_customize->add_setting('pricing_plan_content_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( '<ul><li><i class="fa fa-check"></i>Aenean tempus ac urna</li><li><i class="fa fa-check"></i>Iaculis molestie scelerisque</li><li><i class="fa fa-check"></i>Tristique magna et</li><li><i class="fa fa-check"></i>Consectetur adipiscing elit</li>  <li><i class="fa fa-times"></i>Lorem ipsum dolor sit amet</li><li><i class="fa fa-times"></i>Morbi non ante sagittis</li></ul>', 'Luzuk Premium' )));
    $wp_customize->add_control(
        'pricing_plan_content_'.$i,
        array(
            'settings' => 'pricing_plan_content_'.$i,
            'section' => 'premium_pricing_section',
            'type' => 'textarea',
            'label' => __( 'Plan Content', 'Luzuk Premium' )
        )
    ); 

    $wp_customize->add_setting('pricing_plan_unit_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( '$', 'Luzuk Premium' )));
    $wp_customize->add_control(
        'pricing_plan_unit_'.$i,
        array(
            'settings' => 'pricing_plan_unit_'.$i,
            'section' => 'premium_pricing_section',
            'type' => 'text',
            'label' => __( 'Plan Price Unit', 'Luzuk Premium' )
        )
    );

    $wp_customize->add_setting('pricing_plan_price_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( '3.99', 'Luzuk Premium' )));
    $wp_customize->add_control(
        'pricing_plan_price_'.$i,
        array(
            'settings' => 'pricing_plan_price_'.$i,
            'section' => 'premium_pricing_section',
            'type' => 'text',
            'label' => __( 'Plan price', 'Luzuk Premium' )
        )
    );

    $wp_customize->add_setting('pricing_plan_start_'.$i,array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => __( 'Month', 'Luzuk Premium' )));
    $wp_customize->add_control(
        'pricing_plan_start_'.$i,
        array(
            'settings' => 'pricing_plan_start_'.$i,
            'section' => 'premium_pricing_section',
            'type' => 'text',
            'label' => __( 'Plan Type', 'Luzuk Premium' )
        )
    );




    lzAddElement($wp_customize, 'pricing_plan_url_'.$i, '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(
        'pricing_page_button_title_'.$i,
        array(
            'sanitize_callback'=>'lz_fitness_sanitize_text',
            'default'=> __('Shop Now', 'lz-fitness-premium')
        )
    );
    $wp_customize->add_control(
        'pricing_page_button_title_'.$i,
        array(
            'settings' =>'pricing_page_button_title_'.$i,
            'section' => 'premium_pricing_section',
            'type'=> 'text',
            'label'=> __('Button Text', 'lz-fitness-premium')
        )
    );

addColorPalatOption($wp_customize, 'Pricing_PlanNameColor'.$i, 'premium_pricing_section', 'Plan Name Color', '#56b5f3');

addColorPalatOption($wp_customize, 'Pricing_ContetColor'.$i, 'premium_pricing_section', 'Plan Content Color', '#585858');
addColorPalatOption($wp_customize, 'Pricing_PriceNdPlanTypeTextColor'.$i, 'premium_pricing_section', 'Plan Price & Type Text Color', '#ffffff');
addColorPalatOption($wp_customize, 'Pricing_PlanTBgssColor'.$i, 'premium_pricing_section', 'Plan Price & Plan Type Text Background Color', '#56b5f3');
addColorPalatOption($wp_customize, 'Pricing_PriceBoxBgssColor'.$i, 'premium_pricing_section', 'Plan Box Background Color', '#ffffff');
addColorPalatOption($wp_customize, 'Pricing_Bubble1Color'.$i, 'premium_pricing_section', 'Pricing Box Hover Bubble 1 Background Color', '#56b5f3');
addColorPalatOption($wp_customize, 'Pricing_Bubble2Color'.$i, 'premium_pricing_section', 'Pricing Box Hover Bubble 2 Background Color', '#f39c57');
addColorPalatOption($wp_customize, 'Pricing_Bubble3Color'.$i, 'premium_pricing_section', 'Pricing Box Hover Bubble 3 Background Color', '#8543d6');
addColorPalatOption($wp_customize, 'Pricing_Bubble4Color'.$i, 'premium_pricing_section', 'Pricing Box Hover Bubble 4 Background Color', '#45e3a6');

}

lzCustomLable($wp_customize, 'pricingSectionCommonC', 'premium_pricing_section', 'Common Colors For All Pricing Boxes:');

//addColorPalatOption($wp_customize, 'Pricing_ListIconColor', 'premium_pricing_section', 'List Icon Color', '#56b5f3');
addColorPalatOption($wp_customize, 'Pricing_PlanCrossIconColor', 'premium_pricing_section', 'Plan Cross Icon Color', '#ed0223');
addColorPalatOption($wp_customize, 'Pricing_PlanNameHoverColor', 'premium_pricing_section', 'Plan Name Hover Color', '#ffffff');
addColorPalatOption($wp_customize, 'Pricing_PlanContentHoverColor', 'premium_pricing_section', 'Plan Content Hover Color', '#ffffff');
addColorPalatOption($wp_customize, 'Pricing_PlanIconsHoverColor', 'premium_pricing_section', 'Plan List Icons Hover & Active Box Icon Color', '#ffffff');

addColorPalatOption($wp_customize, 'Pricing_BoxHoveBgssColor', 'premium_pricing_section', 'Plan Box Hover Background Color', '#31348c');
addColorPalatOption($wp_customize, 'Pricing_PriceHvrBrssColor', 'premium_pricing_section', 'Price Box Hover & Active Box Border Color', '#31348c');
addColorPalatOption($wp_customize, 'Pricing_PriceHvrbgsColor', 'premium_pricing_section', 'Price Box Hover Background Color', '#ffffff');
addColorPalatOption($wp_customize, 'Pricing_PriceNdPlanTypeTextHoverColor', 'premium_pricing_section', 'Plan Price & Plan Type Text Hover Color', '#31348c');


lzCustomLable($wp_customize, 'pricingListColor', 'premium_pricing_section', 'List Color For All Pricing Boxes:');

//addColorPalatOption($wp_customize, 'Pricing_ListIconColor', 'premium_pricing_section', 'List Icon Color', '#56b5f3');
addColorPalatOption($wp_customize, 'Pricing_ListIconColor1', 'premium_pricing_section', 'Plan List Icon Color For Pricing Box 1', '#01bbe2');
addColorPalatOption($wp_customize, 'Pricing_ListIconColor2', 'premium_pricing_section', 'Plan List Icon Color For Pricing Box 2', '#01bbe2');
addColorPalatOption($wp_customize, 'Pricing_ListIconColor3', 'premium_pricing_section', 'Plan List Icon Color For Pricing Box 3', '#01bbe2');
addColorPalatOption($wp_customize, 'Pricing_ListIconColor4', 'premium_pricing_section', 'Plan List Icon Color For Pricing Box 4', '#01bbe2');
addColorPalatOption($wp_customize, 'Pricing_ListIconColor5', 'premium_pricing_section', 'Plan List Icon Color For Pricing Box 5', '#01bbe2');
addColorPalatOption($wp_customize, 'Pricing_ListIconColor6', 'premium_pricing_section', 'Plan List Icon Color For Pricing Box 6', '#01bbe2');


lzCustomLable($wp_customize, 'pricingbtnscoloColor', 'premium_pricing_section', 'Set Button Colors:');


addColorPalatOption($wp_customize, 'princing_area_Btntxt_Color', 'premium_pricing_section', 'Button Text & Arrow Color', '#ffffff');

$wp_customize->add_setting(
    'princing_area_ButtonBackground_color_one', array(
        'default'           => '#51b0f2',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'princing_area_ButtonBackground_color_one',array(
            'settings'      => 'princing_area_ButtonBackground_color_one',
            'section'       => 'premium_pricing_section',
            'label'         => __( 'Button Background Color One ', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'princing_area_ButtonBackground_color_two', array(
        'default'           => '#788af8',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'princing_area_ButtonBackground_color_two',array(
            'settings'      => 'princing_area_ButtonBackground_color_two',
            'section'       => 'premium_pricing_section',
            'label'         => __( 'Button Background Color Two ', 'Luzuk Premium' ),
        )
    )
); 
