<?php
$wp_customize->add_section(
    'dinero_contact_section',
    array(
        'title' => __('Contact', 'luzuk-premium' ),
        'panel' => 'luzuk_premium_home_panel1',
        'priority' =>29

    )
);

$wp_customize->add_setting('dinero_reset_contact_settings',array(
  'sanitize_callback'   => 'sanitize_text_field'
));
$wp_customize->add_control(new dinero_Reset_Custom_Control($wp_customize, 'dinero_reset_contact_settings',array(
  'type' => 'reset_control',
   'priority' => 1,
  'label' => __('Reset Contact Section Settings', 'dinero'),
  'description' => 'dinero_contact_reset_settings',
  'section' => 'dinero_contact_section'
)));

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

    $wp_customize->add_control(new luzuk_Tab_Control($wp_customize, 'luzuk_contact_nav', array(
       'section' => 'dinero_contact_section',
       'priority' => 1,
       'buttons' => array(
          array(
             'name' => esc_html__('General', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
                'dinero_contact_enable', 
                'dinero_contact_phonelabel',
                'dinero_contact_phone1',
                'dinero_contact_phone2',
                'dinero_contact_addresslabel',
                'dinero_contact_address',
                'dinero_contact_emaillabel',
                'dinero_contact_email1',
                'dinero_contact_email2',
                'dinero_contact_maintitle',
                'dinero_contact_head_icon_enable',
                'dinero_contact_head_icon',
                'dinero_contact_form_shortcode'
            ),
            'active' => true,
         ),
          array(
            'name' => esc_html__('Style', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-art',
            'fields' => array(   
                'dinero_contact_section_bg_color',
                'dinero_contact_section_bg_image',
                'dinero_contact_image_opacity', 
                'dinero_contact_title_color1',
                'dinero_contact_titleborder_color1',
                'dinero_contact_titleborder_color2', 
                'dinero_contact_box_onload_effects',
                'dinero_contact_head_align'
            ),
         ),
          array(
            'name' => esc_html__('Layout', 'luzuk-premium'),
            'icon' => 'dashicons dashicons-layout',
            'fields' => array(
                'dinero_contact_padding',
                'dinero_contactl_section_t_padding',
                'dinero_contactl_section_b_padding',
                'dinero_contact_padding1',
                'dinero_contactr_section_t_padding',
                'dinero_contactr_section_b_padding',
                'dinero_contact_section_width'
            ),
         )
        ),
    )));

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


$wp_customize->add_setting(
    'dinero_contact_phonelabel',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Lets Talk', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_phonelabel',
    array(
        'settings'      => 'dinero_contact_phonelabel',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Phone label', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'dinero_contact_phone1',
    array(
        'sanitize_callback' => 'dinero_sanitize_phone_number',
        'default'           => __( '(+782) 983 0965', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_phone1',
    array(
        'settings'      => 'dinero_contact_phone1',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'First Phone Number', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'dinero_contact_phone2',
    array(
        'sanitize_callback' => 'dinero_sanitize_phone_number',
        'default'           => __( '(+452) 320 1946', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_phone2',
    array(
        'settings'      => 'dinero_contact_phone2',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Second Phone Number', 'Luzuk' )
    )
);


$wp_customize->add_setting(
    'dinero_contact_addresslabel',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Our Location', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_addresslabel',
    array(
        'settings'      => 'dinero_contact_addresslabel',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Address label', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'dinero_contact_address',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'TA-134/A Gulshan Badda Link Rd, Dhaka', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_address',
    array(
        'settings'      => 'dinero_contact_address',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Address', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'dinero_contact_emaillabel',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'E-mail Us', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_emaillabel',
    array(
        'settings'      => 'dinero_contact_emaillabel',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Email label', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'dinero_contact_email1',
    array(
        'sanitize_callback' => 'sanitize_email',
        'default'           => __( 'info@yourmail.com', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_email1',
    array(
        'settings'      => 'dinero_contact_email1',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'First Email', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'dinero_contact_email2',
    array(
        'sanitize_callback' => 'sanitize_email',
        'default'           => __( 'info@exe.com', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_email2',
    array(
        'settings'      => 'dinero_contact_email2',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Second Email', 'Luzuk' )
    )
);


$wp_customize->add_setting(
    'dinero_contact_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'CONTACT US', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_maintitle',
    array(
        'settings'      => 'dinero_contact_maintitle',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'Luzuk' )
    )
);

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


$wp_customize->add_setting(
    'dinero_contact_form_shortcode',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Add form shortcode here', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'dinero_contact_form_shortcode',
    array(
        'settings'      => 'dinero_contact_form_shortcode',
        'section'       => 'dinero_contact_section', 
        'type'          => 'text',
        'label'         => __( 'Form Shortcode ', 'Luzuk' )
    )
);
    $wp_customize->add_setting('dinero_contact_padding',array(
      'sanitize_callback'   => 'esc_html'
   ));
   $wp_customize->add_control('dinero_contact_padding',array(
      'label' => __('Section Padding','dinero'),
      'section' => 'dinero_contact_section'
   ));

  $wp_customize->add_setting('dinero_contactl_section_t_padding',array(
        'default' => '5',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_contactl_section_t_padding',array(
    'type' => 'number',
    'label' => __('Top','dinero'),
    'section' => 'dinero_contact_section',
    ));
     $wp_customize->add_setting('dinero_contactl_section_b_padding',array(
        'default' => '7',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_contactl_section_b_padding',array(
    'type' => 'number',
    'label' => __('Bottom','dinero'),
    'section' => 'dinero_contact_section',
    ));

    $wp_customize->add_setting('dinero_contact_padding1',array(
      'sanitize_callback'   => 'esc_html'
   ));
   $wp_customize->add_control('dinero_contact_padding1',array(
      'label' => __('Form Padding','dinero'),
      'section' => 'dinero_contact_section'
   ));



 $wp_customize->add_setting('dinero_contactr_section_t_padding',array(
        'default' => '5',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_contactr_section_t_padding',array(
    'type' => 'number',
    'label' => __('Top','dinero'),
    'section' => 'dinero_contact_section',
    ));
     $wp_customize->add_setting('dinero_contactr_section_b_padding',array(
        'default' => '5',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('dinero_contactr_section_b_padding',array(
    'type' => 'number',
    'label' => __('Bottom','dinero'),
    'section' => 'dinero_contact_section',
    ));


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

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

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


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


    $wp_customize->add_setting('dinero_contact_box_onload_effects',array(
        'default' => 'zoom-in',
        'sanitize_callback' => 'dinero_sanitize_choices',
    ));
    $wp_customize->add_control('dinero_contact_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_contact_section',
    ));

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

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

addColorPalatOption($wp_customize, 'dinero_contact_title_color1', 'dinero_contact_section', 'Section Heading color  ', '');

addColorPalatOption($wp_customize, 'dinero_contact_titleborder_color1', 'dinero_contact_section', 'Section Heading border color 1 ', '');

addColorPalatOption($wp_customize, 'dinero_contact_titleborder_color2', 'dinero_contact_section', 'Section Heading border color 2 ', '');

?>