<?php 
$wp_customize->add_section(
    'dinero_service_section',
    array(
        'title'   => __( 'Services', 'Luzuk' ),
        'panel'   => 'luzuk_premium_home_panel1',
        'priority' =>19
    )
);

$wp_customize->add_setting('dinero_reset_service_settings',array(
  'sanitize_callback'   => 'sanitize_text_field'
));
$wp_customize->add_control(new dinero_Reset_Custom_Control($wp_customize, 'dinero_reset_service_settings',array(
  'type' => 'reset_control',
   'priority' => 1,
  'label' => __('Reset Service Section Settings', 'dinero'),
  'description' => 'dinero_services_reset_settings',
  'section' => 'dinero_service_section'
)));

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

    $wp_customize->add_control(new luzuk_Tab_Control($wp_customize, 'luzuk_Services_nav', array(
       'section' => 'dinero_service_section',
       'priority' => 1,
       'buttons' => array(
          array(
             'name' => esc_html__('General', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
                'dinero_service_enable', 
                'dinero_services_maintitle',
                'dinero_services_subtitle',
                'dinero_service_head_icon_enable',
                'dinero_service_head_icon',  
                'dinero_service_area_lbl',
                'dinero_service_section_lbl',            
                'dinero_service_icon1',
                'dinero_service_icon2',
                'dinero_service_icon3',
                'dinero_service_icon4',
                'dinero_service_icon5',
                'dinero_service_icon6',
                'dinero_service_icon7',
                'dinero_service_icon8',
                'dinero_service_icon9',
                'dinero_service_icon10',
                'dinero_service_icon11',
                'dinero_service_icon12',
                'dinero_service_heading1',
                'dinero_service_heading2',
                'dinero_service_heading3',
                'dinero_service_heading4',
                'dinero_service_heading5',
                'dinero_service_heading6',
                'dinero_service_heading7',
                'dinero_service_heading8',
                'dinero_service_heading9',
                'dinero_service_heading10',
                'dinero_service_heading11',
                'dinero_service_heading12',
                'dinero_service_page1',
                'dinero_service_page2',
                'dinero_service_page3',
                'dinero_service_page4',
                'dinero_service_page5',
                'dinero_service_page6',
                'dinero_service_page7',
                'dinero_service_page8',
                'dinero_service_page9',
                'dinero_service_page10',
                'dinero_service_page11',
                'dinero_service_page12',
                'dinero_service_icon_enable',
                'dinero_service_button_enable',
                'dinero_service_button_text'
            ),
            'active' => true,
         ),
          array(
            'name' => esc_html__('Style', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-art',
            'fields' => array(
                'dinero_service_section_bg_color',
                'dinero_service_section_bg_image',
                'dinero_service_image_opacity',  
                'dinero_services_imghover_color', 
                'dinero_services_borderhover_color',      
                'dinero_service_box_onload_effects',
                'dinero_service_title_case',
                'dinero_services_head_align',
                'dinero_services_content_align',
                'dinero_services_heading_color1',
                'dinero_services_heading_color2',
                'dinero_services_headingborder_color1',
                'dinero_services_headingborder_color2',
                'dinero_services_subheading_color',
                 'dinero_services_icon_color1',
                'dinero_services_icon_color2',
                'dinero_services_iconbg_color',
                 'dinero_services_title_color1',
                'dinero_services_title_color2',
                'dinero_services_text_color',
                'dinero_services_btntext_color1',
                'dinero_services_btntext_color2',
                'dinero_services_boxbg_color'            ),
         ),
          array(
            'name' => esc_html__('Layout', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-layout',
            'fields' => array(
                'dinero_service_padding',                
                'dinero_service_top_padding',
                'dinero_service_bottom_padding',
                 'dinero_service_number',
                 'dinero_service_section_width',                
                'dinero_services_post_image_height',                
                'dinero_services_post_excerpt'
            ),
         )
        ),
    )));

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

$wp_customize->add_setting(
    'dinero_services_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'OUR SERVICES', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_services_maintitle',
    array(
        'settings'      => 'dinero_services_maintitle',
        'section'       => 'dinero_service_section', 
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'Luzuk' )
    )
);

$wp_customize->add_setting('dinero_service_head_icon_enable',array(
        'default' => 'No',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_service_head_icon_enable',array(
        'type' => 'radio',
        'label' => __('Heading Icon Display','dinero'),
        'choices' => array (
            'No' => __('No','dinero'),
            'Yes' => __('Yes','dinero')        
        ),
        'section' => 'dinero_service_section'
    ));
 $wp_customize->add_setting(
        'dinero_service_head_icon',
        array(
            'default'           => 'fa fa-bell',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'dinero_service_head_icon',
            array(
                // 'settings'      => 'dinero_service_head_icon',
                'section'       => 'dinero_service_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
                'active_callback' => 'dinero_service_type_icon'
            )
        )
    );


$wp_customize->add_setting(
    'dinero_services_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'WORKING COMPANY FACILITY', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_services_subtitle',
    array(
        'settings'      => 'dinero_services_subtitle',
        'section'       => 'dinero_service_section', 
        'type'          => 'text',
        'label'         => __( 'Section Sub Heading', 'Luzuk' )
    )
);

$ServicesSingleChoice[] = 'select';
if(!is_array($ServicesSingleChoice)){
    $wp_customize->add_setting('dinero_service_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
    $wp_customize->add_control(
        new luzuk_Info_Text( 
            $wp_customize,
            'dinero_service_area_lbl',
            array(
                'settings'      => 'dinero_service_area_lbl',
                'section'       => 'dinero_service_section',
                'label'         => __( 'Note:', 'Luzuk Premium' ), 
                'description'   => __( '<strong>Changes will not reflect unless you select the service.</strong> <br/>Please add the service from "service menu" and then select Testimonial to show information.', 'Luzuk Premium' ),
            )
        )
    );
}
$wp_customize->add_setting('dinero_service_section_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'dinero_service_section_lbl',
        array(
            'settings'      => 'dinero_service_section_lbl',
            'section'       => 'dinero_service_section',
            'label'         => __( 'Note:', 'Luzuk Premium' ), 
            'description'   => __( 'Just place the shortcode "[SERVICES]" in your page to list the service in a page ', 'Luzuk Premium' ),
        )
    )
);

//service PAGES
for( $i = 1; $i<= 12; $i++ ){
    $wp_customize->add_setting(
        'dinero_service_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'dinero_service_heading'.$i,
            array(
                'settings'      => 'dinero_service_heading'.$i,
                'section'       => 'dinero_service_section',
                'label'         => __( 'Service', 'Luzuk Premium' ).$i,
            )
        )
    );
    $wp_customize->add_setting(
        'dinero_service_page'.$i,
        array(
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control(
        'dinero_service_page'.$i,
        array(
            'settings'      => 'dinero_service_page'.$i,
            'section'       => 'dinero_service_section',
            'type'=> 'select',
            'label'         => __( 'Select Service', 'Luzuk Premium' ),
            'choices' => $ServicesSingleChoice,
        )
    );
    $wp_customize->add_setting(
        'dinero_service_icon'.$i,
        array(
            'default'           => 'fa fa-bar-chart',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'dinero_service_icon'.$i,
            array(
                'settings'      => 'dinero_service_icon'.$i,
                'section'       => 'dinero_service_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' )
            )
        )
    );
}

$wp_customize->add_setting( 'dinero_service_icon_enable',array(
    'default' => true,
    'sanitize_callback' => 'dinero_switch_sanitization'
) );
$wp_customize->add_control( new Dinero_Toggle_Switch_Custom_Control( $wp_customize, 'dinero_service_icon_enable',array(
    'label' => __( 'Icon Display','dinero' ),
    'section' => 'dinero_service_section'
)));

$wp_customize->add_setting( 'dinero_service_button_enable',array(
    'default' => true,
    'sanitize_callback' => 'dinero_switch_sanitization'
) );
$wp_customize->add_control( new Dinero_Toggle_Switch_Custom_Control( $wp_customize, 'dinero_service_button_enable',array(
    'label' => __( 'Button Display','dinero' ),
    'section' => 'dinero_service_section'
)));

$wp_customize->add_setting(
    'dinero_service_button_text',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'READ MORE' )
    )
);
$wp_customize->add_control(
    'dinero_service_button_text',
    array(
        'settings'      => 'dinero_service_button_text',
        'section'       => 'dinero_service_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);

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

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


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

addColorPalatOption($wp_customize, 'dinero_services_imghover_color', 'dinero_service_section', 'Image hover color', '');
addColorPalatOption($wp_customize, 'dinero_services_borderhover_color', 'dinero_service_section', 'Border hover color', '');

 $wp_customize->add_setting('dinero_service_box_onload_effects',array(
        'default' => 'wow zoomIn',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_service_box_onload_effects',array(
        'type' => 'select',
        'label' => __('Box 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_service_section',
    ));

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

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

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

addColorPalatOption($wp_customize, 'dinero_services_heading_color1', 'dinero_service_section', 'Heading color', '');
addColorPalatOption($wp_customize, 'dinero_services_heading_color2', 'dinero_service_section', 'Heading color', '');

addColorPalatOption($wp_customize, 'dinero_services_headingborder_color1', 'dinero_service_section', 'Heading border color', '');
addColorPalatOption($wp_customize, 'dinero_services_headingborder_color2', 'dinero_service_section', 'Heading border color', '');

addColorPalatOption($wp_customize, 'dinero_services_subheading_color', 'dinero_service_section', 'Subheading color ', '');

addColorPalatOption($wp_customize, 'dinero_services_icon_color1', 'dinero_service_section', 'Icon color', '');
addColorPalatOption($wp_customize, 'dinero_services_icon_color2', 'dinero_service_section', 'Icon color', '');

addColorPalatOption($wp_customize, 'dinero_services_iconbg_color', 'dinero_service_section', 'Icon Background color', '');

addColorPalatOption($wp_customize, 'dinero_services_title_color1', 'dinero_service_section', 'Title color', '');
addColorPalatOption($wp_customize, 'dinero_services_title_color2', 'dinero_service_section', 'Title color', '');

addColorPalatOption($wp_customize, 'dinero_services_text_color', 'dinero_service_section', 'Text color ', '');

addColorPalatOption($wp_customize, 'dinero_services_btntext_color1', 'dinero_service_section', 'Button Text color', '');
addColorPalatOption($wp_customize, 'dinero_services_btntext_color2', 'dinero_service_section', 'Button Text color', '');
addColorPalatOption($wp_customize, 'dinero_services_boxbg_color', 'dinero_service_section', 'Box Background color', '');

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

    $wp_customize->add_setting('dinero_service_top_padding',array(
        'default' => '5',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_service_top_padding',array(
    'type' => 'number',
    'label' => __('Top','dinero'),
    'section' => 'dinero_service_section',
    ));
     $wp_customize->add_setting('dinero_service_bottom_padding',array(
        'default' => '4',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_service_bottom_padding',array(
    'type' => 'number',
    'label' => __('Bottom','dinero'),
    'section' => 'dinero_service_section',
    ));


  $wp_customize->add_setting('dinero_service_section_width',array(
        'default' => 'Box Width',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_service_section_width',array(
        'type' => 'select',
        'label' => __('Section Width','dinero'),
        'choices' => array (
            'Box Width' => __('Box Width','dinero'),
            'Full Width' => __('Full Width','dinero')
        ),
        'section' => 'dinero_service_section',
    ));
$wp_customize->add_setting('dinero_service_number',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'dinero_service_number',
    array(
        'settings'      => 'dinero_service_number',
        'section'       => 'dinero_service_section',
        'type'          => 'select',
        'label'         => __( 'Number of service to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

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

$wp_customize->add_setting('dinero_services_post_image_height',array(
        'default' => 200,
        'sanitize_callback' => 'dinero_sanitize_integer'
    ));
    $wp_customize->add_control(new dinero_Custom_Control( $wp_customize, 'dinero_services_post_image_height',array(
    'label' => __('Image Height','dinero'),
    'section' => 'dinero_service_section',
    'input_attrs' => array(
            'min' => 0,
            'max' => 500,
            'step' => 1,
        ),
    )));

    $wp_customize->add_setting('dinero_services_post_excerpt',array(
        'default' => 20,
        'sanitize_callback' => 'dinero_sanitize_integer'
    ));
    $wp_customize->add_control(new dinero_Custom_Control( $wp_customize, 'dinero_services_post_excerpt',array(
    'label' => __('Excerpt Length','dinero'),
    'section' => 'dinero_service_section',
    'input_attrs' => array(
            'min' => 0,
            'max' => 100,
            'step' => 1,
        ),
    )));
  

  

?>