<?php 
$wp_customize->add_section(
    'dinero_pricing_section',
    array(
        'title' => __( 'Pricing Plan', 'Luzuk' ),
        'panel' => 'luzuk_premium_home_panel1',
        'priority' =>28
    ));

$wp_customize->add_setting('dinero_reset_pricing_settings',array(
  'sanitize_callback'   => 'sanitize_text_field'
));
$wp_customize->add_control(new dinero_Reset_Custom_Control($wp_customize, 'dinero_reset_pricing_settings',array(
  'type' => 'reset_control',
   'priority' => 1,
  'label' => __('Reset Pricing Section Settings', 'dinero'),
  'description' => 'dinero_pricing_reset_settings',
  'section' => 'dinero_pricing_section'
)));

$wp_customize->add_setting('luzuk_pricing_nav', array(
       'sanitize_callback' => 'wp_kses_post',
    ));

    $wp_customize->add_control(new luzuk_Tab_Control($wp_customize, 'luzuk_pricing_nav', array(
       'section' => 'dinero_pricing_section',
       'priority' => 1,
       'buttons' => array(
          array(
             'name' => esc_html__('General', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
                'dinero_pricing_enable', 
                'dinero_pricing_maintitle',
                'dinero_pricing_head_icon_enable',
                'dinero_pricing_head_icon',
                'dinero_pricing_subtitle',
                'dinero_pricing_npp_heading',
                'dinero_pricing_npp_count',
                'dinero_pricing_plan_heading_1',
                'dinero_pricing_plan_name_1',
                'dinero_pricing_plan_tagline_1',
                'dinero_pricing_plan_unit_1',
                'dinero_pricing_plan_price_1',
                
                'dinero_pricing_plan_content_1',
                'pricing_page_button_title_1',
                'dinero_pricing_plan_url_1',
                'dinero_pricing_plan_heading_2',
                'dinero_pricing_plan_name_2',
                'dinero_pricing_plan_tagline_2',
                'dinero_pricing_plan_unit_2',
                'dinero_pricing_plan_price_2',
                
                'dinero_pricing_plan_content_2',
                'pricing_page_button_title_2',
                'dinero_pricing_plan_url_2',
                'dinero_pricing_plan_heading_3',
                'dinero_pricing_plan_name_3',
                'dinero_pricing_plan_tagline_3',
                'dinero_pricing_plan_unit_3',
                'dinero_pricing_plan_price_3',
                
                'dinero_pricing_plan_content_3',
                'pricing_page_button_title_3',
                'dinero_pricing_plan_url_3',
                'dinero_pricing_plan_heading_4',
                'dinero_pricing_plan_name_4',
                'dinero_pricing_plan_tagline_4',
                'dinero_pricing_plan_unit_4',
                'dinero_pricing_plan_price_4',
                
                'dinero_pricing_plan_content_4',
                'pricing_page_button_title_4',
                'dinero_pricing_plan_url_4',
                'dinero_pricing_plan_heading_5',
                'dinero_pricing_plan_name_5',
                'dinero_pricing_plan_tagline_5',
                'dinero_pricing_plan_unit_5',
                'dinero_pricing_plan_price_5',
                
                'dinero_pricing_plan_content_5',
                'pricing_page_button_title_5',
                'dinero_pricing_plan_url_5',
                'dinero_pricing_plan_heading_6',
                'dinero_pricing_plan_name_6',
                'dinero_pricing_plan_tagline_6',
                'dinero_pricing_plan_unit_6',
                'dinero_pricing_plan_price_6',
                
                'dinero_pricing_plan_content_6',
                'pricing_page_button_title_6',
                'dinero_pricing_plan_url_6',
                'dinero_pricing_plan_heading_7',
                'dinero_pricing_plan_name_7',
                'dinero_pricing_plan_tagline_7',
                'dinero_pricing_plan_unit_7',
                'dinero_pricing_plan_price_7',
                
                'dinero_pricing_plan_content_7',
                'pricing_page_button_title_7',
                'dinero_pricing_plan_url_7',
                'dinero_pricing_plan_heading_8',
                'dinero_pricing_plan_name_8',
                'dinero_pricing_plan_tagline_8',
                'dinero_pricing_plan_unit_8',
                'dinero_pricing_plan_price_8',
                
                'dinero_pricing_plan_content_8',
                'pricing_page_button_title_8',
                'dinero_pricing_plan_url_8',
                'dinero_pricing_plan_heading_9',
                'dinero_pricing_plan_name_9',
                'dinero_pricing_plan_tagline_9',
                'dinero_pricing_plan_unit_9',
                'dinero_pricing_plan_price_9',
                
                'dinero_pricing_plan_content_9',
                'pricing_page_button_title_9',
                'dinero_pricing_plan_url_9',
                'dinero_pricing_plan_heading_10',
                'dinero_pricing_plan_name_10',
                'dinero_pricing_plan_tagline_10',
                'dinero_pricing_plan_unit_10',
                'dinero_pricing_plan_price_10',
                
                'dinero_pricing_plan_content_10',
                'pricing_page_button_title_10',
                'dinero_pricing_plan_url_10',
                'dinero_pricing_plan_heading_11',
                'dinero_pricing_plan_name_11',
                'dinero_pricing_plan_tagline_11',
                'dinero_pricing_plan_unit_11',
                'dinero_pricing_plan_price_11',                
                'dinero_pricing_plan_content_11',
                'pricing_page_button_title_11',
                'dinero_pricing_plan_url_11',
                'dinero_pricing_plan_heading_12',
                'dinero_pricing_plan_name_12',
                'dinero_pricing_plan_tagline_12',
                'dinero_pricing_plan_unit_12',
                'dinero_pricing_plan_price_12',                
                'dinero_pricing_plan_content_12',
                'pricing_page_button_title_12',
                'dinero_pricing_plan_url_12'
            ),
            'active' => true,
         ),
          array(
            'name' => esc_html__('Style', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-art',
            'fields' => array(
                'dinero_pricing_section_bg_color',
                'dinero_pricing_section_bg_image',
                'dinero_pricing_image_opacity',
                'dinero_pricing_title_color1',
                'dinero_pricing_title_color2',
                'dinero_pricing_subtitle_color',               
                'dinero_pricing_box_onload_effects',
                 'dinero_pricing_title_case',
                'dinero_pricing_head_align',
                'dinero_pricing_box_align'
            ),
         ),
          array(
            'name' => esc_html__('Layout', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-layout',
            'fields' => array(
                'dinero_pricing_padding',
                'dinero_pricing_section_t_padding',
                'dinero_pricing_section_b_padding',
                'dinero_pricing_section_width'
            ),
         )
        ),
    )));

$wp_customize->add_setting( 'dinero_pricing_enable',array(
    'default' => true,
    'sanitize_callback' => 'dinero_switch_sanitization'
) );
$wp_customize->add_control( new Dinero_Toggle_Switch_Custom_Control( $wp_customize, 'dinero_pricing_enable',array(
    'label' => __( 'Disable Section','dinero' ),
    'section' => 'dinero_pricing_section'
)));

$wp_customize->add_setting(
    'dinero_pricing_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'EXPLORE PACKAGES', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_pricing_maintitle',
    array(
        'settings'      => 'dinero_pricing_maintitle',
        'section'       => 'dinero_pricing_section', 
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'Luzuk' )
    )
);

$wp_customize->add_setting('dinero_pricing_head_icon_enable',array(
        'default' => 'No',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_pricing_head_icon_enable',array(
        'type' => 'radio',
        'label' => __('Heading Icon Display','dinero'),
        'choices' => array (
            'No' => __('No','dinero'),
            'Yes' => __('Yes','dinero')        
        ),
        'section' => 'dinero_pricing_section'
    ));
 $wp_customize->add_setting(
        'dinero_pricing_head_icon',
        array(
            'default'           => 'fa fa-bell',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'dinero_pricing_head_icon',
            array(
                'section'       => 'dinero_pricing_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
                'active_callback' => 'dinero_pricing_type_icon'
            )
        )
    );

$wp_customize->add_setting(
    'dinero_pricing_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'CHOOSE BEST PACKAGES', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_pricing_subtitle',
    array(
        'settings'      => 'dinero_pricing_subtitle',
        'section'       => 'dinero_pricing_section', 
        'type'          => 'text',
        'label'         => __( 'Section Sub Heading', 'Luzuk' )
    )
);


    $wp_customize->add_setting('dinero_pricing_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'dinero_pricing_npp_heading',
            array(
                'settings'      => 'dinero_pricing_npp_heading',
                'section'       => 'dinero_pricing_section',
                'label'         => __( 'Pricing planes to show', 'Luzuk' ),
            )
        )
    );    
    $wp_customize->add_setting('dinero_pricing_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
    $wp_customize->add_control(
        'dinero_pricing_npp_count',
        array(
            'settings'      => 'dinero_pricing_npp_count',
            'section'       => 'dinero_pricing_section',
            'type'          => 'select',
            'label'         => __( 'Number of plan to show', 'Luzuk' ),
            'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
        )
    );
    for($i=1;$i<=12;$i++){
        $wp_customize->add_setting('dinero_pricing_plan_heading_'.$i,array('sanitize_callback' => 'luzuk_sanitize_text'));
        $wp_customize->add_control(
            new luzuk_Customize_Heading(
                $wp_customize,
                'dinero_pricing_plan_heading_'.$i,
                array(
                    'settings' => 'dinero_pricing_plan_heading_'.$i,
                    'section' => 'dinero_pricing_section',
                    'label' => __( 'Pricing Plan'.$i, 'Luzuk' ),
                )
            )
        ); 

$wp_customize->add_setting('dinero_pricing_plan_name_'.$i,array('sanitize_callback' => 'luzuk_sanitize_text','default' => __( 'Easy Start', 'Luzuk' )));
        $wp_customize->add_control(
            'dinero_pricing_plan_name_'.$i,
            array(
                'settings' => 'dinero_pricing_plan_name_'.$i,
                'section' => 'dinero_pricing_section',
                'type' => 'text',
                'label' => __( 'Add Plan Name Here:', 'Luzuk' )
            )
        );

 $wp_customize->add_setting('dinero_pricing_plan_tagline_'.$i,array('sanitize_callback' => 'luzuk_sanitize_text','default' => __( '4 Hours of coaching', 'Luzuk' )));
        $wp_customize->add_control(
            'dinero_pricing_plan_tagline_'.$i,
            array(
                'settings' => 'dinero_pricing_plan_tagline_'.$i,
                'section' => 'dinero_pricing_section',
                'type' => 'text',
                'label' => __( 'Add Plan Time Here:', 'Luzuk' )
            )
        );

        $wp_customize->add_setting('dinero_pricing_plan_unit_'.$i,array('sanitize_callback' => 'luzuk_sanitize_text','default' => __( '$', 'Luzuk' )));
        $wp_customize->add_control(
            'dinero_pricing_plan_unit_'.$i,
            array(
                'settings' => 'dinero_pricing_plan_unit_'.$i,
                'section' => 'dinero_pricing_section',
                'type' => 'text',
                'label' => __( 'Add Plan Unit Here:', 'Luzuk' )
            )
        );
       
         $wp_customize->add_setting('dinero_pricing_plan_price_'.$i,array('sanitize_callback' => 'luzuk_sanitize_text','default' => __( '136', 'Luzuk' )));
        $wp_customize->add_control(
            'dinero_pricing_plan_price_'.$i,
            array(
                'settings' => 'dinero_pricing_plan_price_'.$i,
                'section' => 'dinero_pricing_section',
                'type' => 'text',
                'label' => __( 'Add Plan Price Here:', 'Luzuk' )
            )
        );

        

         $wp_customize->add_setting('dinero_pricing_plan_content_'.$i,array('sanitize_callback' => 'luzuk_sanitize_text','default' => __( '
             <li>Pre-Coaching Conversation</li>
            <li>4 Coaching Sessions</li>
            <li>Final Conversation</li>', 'Luzuk' )));
        $wp_customize->add_control(
            'dinero_pricing_plan_content_'.$i,
            array(
                'settings' => 'dinero_pricing_plan_content_'.$i,
                'section' => 'dinero_pricing_section',
                'type' => 'textarea',
                'label' => __( 'Add Pricing Plan List Here:', 'Luzuk' )
            )
        );

    /*code for button text*/
    // $wp_customize->add_setting(
    //     'pricing_page_button_title_'.$i,
    //     array(
    //         'sanitize_callback'=>'luzuk_sanitize_text',
    //         'default'=> __('Appointment', 'Luzuk')
    //     )
    // );
    // $wp_customize->add_control(
    //     'pricing_page_button_title_'.$i,
    //     array(
    //         'settings' =>'pricing_page_button_title_'.$i,
    //         'section' => 'dinero_pricing_section',
    //         'type'=> 'text',
    //         'label'=> __('Add Button Text Here:', 'Luzuk')
    //     )
    // );

        lzAddElement($wp_customize, 'dinero_pricing_plan_url_'.$i, 'dinero_pricing_section', $type = 'text', $label="Add Link for Pricing Plan".$i."&nbsp;if Pricing Plan selected", $callback ='esc_url', $default='#');

    }

    $wp_customize->add_setting('dinero_pricing_padding',array(
      'sanitize_callback'   => 'esc_html'
   ));
   $wp_customize->add_control('dinero_pricing_padding',array(
      'label' => __('Section Padding','dinero'),
      'section' => 'dinero_pricing_section'
   ));


 $wp_customize->add_setting('dinero_pricing_section_t_padding',array(
        'default' => '2.5',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_pricing_section_t_padding',array(
    'type' => 'number',
    'label' => __('Top','dinero'),
    'section' => 'dinero_pricing_section',
    ));
     $wp_customize->add_setting('dinero_pricing_section_b_padding',array(
        'default' => '13',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_pricing_section_b_padding',array(
    'type' => 'number',
    'label' => __('Bottom','dinero'),
    'section' => 'dinero_pricing_section',
    ));


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

$wp_customize->add_setting( 'dinero_pricing_section_bg_color', array(
       'default' => '',
       'sanitize_callback' => 'sanitize_hex_color'
    ));
    $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'dinero_pricing_section_bg_color', array(
        'label' => __('Section Background Color','dinero'),
       'section' => 'dinero_pricing_section',
    )));

    $wp_customize->add_setting( 'dinero_pricing_section_bg_image', array(
       'default' => '',
       'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'dinero_pricing_section_bg_image', array(
        'label' => __('Section Background Image','dinero'),
       'section' => 'dinero_pricing_section',
    )));


     $wp_customize->add_setting('dinero_pricing_image_opacity',array(
        'default' => 1,
        'sanitize_callback' => 'dinero_sanitize_float'
    ));
    $wp_customize->add_control(new dinero_Custom_Control( $wp_customize, 'dinero_pricing_image_opacity',array(
    'label' => __('Background Opacity','dinero'),
    'section' => 'dinero_pricing_section',
    'input_attrs' => array(
            'min' => 0,
            'max' => 1,
            'step' => 0.1,
        ),
    )));


    $wp_customize->add_setting('dinero_pricing_box_onload_effects',array(
        'default' => 'zoom-in',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_pricing_box_onload_effects',array(
        'type' => 'select',
        'label' => __('Onload Transition Effects','dinero'),
        'choices' => array (
            'wow bounceInLeft' => __('Bounce In Left','dinero'),
            'wow bounceInRight' => __('Bounce In Right','dinero'),
            'wow bounceInUp' => __('Bounce In Up','dinero'),
            'wow bounceInDown' => __('Bounce In Down','dinero'),
            'wow zoomIn' => __('Zoom In','dinero'),
            'wow zoomOut' => __('Zoom Out','dinero'),
            'wow fadeInDown' => __('Fade In Down','dinero'),            
            'wow fadeInUp' => __('Fade In Up','dinero'),
            'wow fadeInLeft' => __('Fade In Left','dinero'),
            'wow fadeInRight' => __('Fade In Right','dinero'),
            'flip-up' => __('Flip Up','dinero')
        ),
        'section' => 'dinero_pricing_section',
    ));

    
$wp_customize->add_setting('dinero_pricing_title_case',array(
        'default' => 'Uppercase',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_pricing_title_case',array(
        'type' => 'select',
        'label' => __('Pricing Title Case','dinero'),
        'choices' => array (
            'Uppercase' => __('Uppercase','dinero'),
            'Lowercase' => __('Lowercase','dinero'),
            'Capitalize' => __('Capitalize','dinero')
        ),
        'section' => 'dinero_pricing_section',
    ));

    $wp_customize->add_setting('dinero_pricing_head_align',array(
        'default' => 'Center',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_pricing_head_align',array(
        'type' => 'select',
        'label' => __('Section Head Alignment','dinero'),
        'choices' => array (
            'Center' => __('Center','dinero'),
            'Left' => __('Left','dinero'),
            'Right' => __('Right','dinero')
        ),
        'section' => 'dinero_pricing_section',
    ));

    $wp_customize->add_setting('dinero_pricing_box_align',array(
        'default' => 'Center',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_pricing_box_align',array(
        'type' => 'select',
        'label' => __('Content Box Alignment','dinero'),
        'choices' => array (
            'Center' => __('Center','dinero'),
            'Left' => __('Left','dinero'),
            'Right' => __('Right','dinero')
        ),
        'section' => 'dinero_pricing_section',
    ));

    $wp_customize->add_setting('dinero_pricing_section_width',array(
        'default' => 'Box Width',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_pricing_section_width',array(
        'type' => 'select',
        'label' => __('Section Width','dinero'),
        'choices' => array (
            'Box Width' => __('Box Width','dinero'),
            'Full Width' => __('Full Width','dinero')
        ),
        'section' => 'dinero_pricing_section',
    ));

addColorPalatOption($wp_customize, 'dinero_pricing_title_color1', 'dinero_pricing_section', 'Section Heading color 1 ', '');

addColorPalatOption($wp_customize, 'dinero_pricing_title_color2', 'dinero_pricing_section', 'Section Heading color 2 ', '');

addColorPalatOption($wp_customize, 'dinero_pricing_subtitle_color', 'dinero_pricing_section', 'Section Sub Heading color ', '');

?>