<?php
/**
 * Createing a contact us page pannel for customizer
 *
 */

// CREATING A SECTION IN CUSTOMIZER
$wp_customize->add_section(
	'luzuk_premium_contactus_section',
	array(
		'title' => __( 'Contact Us Page', 'luzuk-premium' ),
        // 'panel' => 'luzuk_premium_home_panel'
		'priority' =>20
	)
);

lzCustomLable($wp_customize, 'contuspg_detailbx', 'luzuk_premium_contactus_section', 'Conatct Details');

//backgroundManager($wp_customize, 'con_detailbx', 'luzuk_premium_contactus_section', $color='#000', get_template_directory_uri().'/images/conpgbg.jpg', 'color');

$wp_customize->add_setting(
	'luzuk_contactus_address',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( '123 Vineyard Lane, Wine Country, CA 12345', 'luzuk Premium' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_address',
	array(
		'settings'      => 'luzuk_contactus_address',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'textarea',
		'label'         => __( 'Address', 'luzuk Premium' )
	)
);

$wp_customize->add_setting(
	'luzuk_contactus_phone',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( '(123) 456-7890', 'luzuk Premium' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_phone',
	array(
		'settings'      => 'luzuk_contactus_phone',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'text',
		'label'         => __( 'Phone No', 'luzuk Premium' )
	)
);


$wp_customize->add_setting(
	'luzuk_contactus_email',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( 'Support@Wineshop.Com', 'luzuk Premium' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_email',
	array(
		'settings'      => 'luzuk_contactus_email',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'text',
		'label'         => __( 'Email ID', 'luzuk Premium' )
	)
);

lzCustomLable($wp_customize, 'luzuk_sec_contpageclr', 'luzuk_premium_contactus_section', 'Conatct Details Color ');

addColorPalatOption($wp_customize, 'luzuk_contactus_dicnClr', 'luzuk_premium_contactus_section', 'Icon Color', '#DFDABA');

addColorPalatOption($wp_customize, 'luzuk_contactus_dphemClr', 'luzuk_premium_contactus_section', 'Address ,Phone No.,  Email Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_contactus_dphemhvClr', 'luzuk_premium_contactus_section', 'Email , Phone No. Hover Color', '#DDA759');

// ADDRESS GOOGLE/MSN/OTHER MAP IFRAME OR EMBADE CODE
$wp_customize->add_setting('luzuk_contactus_iframe_lbl', array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
	new luzuk_Customize_Heading($wp_customize, 'luzuk_contactus_iframe_lbl',
		array(
			'settings'      => 'luzuk_contactus_iframe_lbl',
			'section'       => 'luzuk_premium_contactus_section',
			'label'         => __( 'Contact Us Address', 'luzuk-premium' ),
		)
	)
);

//field for addeding the map code

$wp_customize->add_setting('luzuk_contactus_embade', array(/*'sanitize_callback' => 'esc_url_raw',*/ 'default'=>'Add Your Map Embade Code'));
$wp_customize->add_control('luzuk_contactus_embade', array('settings'=>'luzuk_contactus_embade', 'section'=>'luzuk_premium_contactus_section','type'=>'textarea', 'label'=> __('Code For Map', 'luzuk-premium')));

lzCustomLable($wp_customize, 'contuspg_leftbximg', 'luzuk_premium_contactus_section', 'Select Image');

$wp_customize->add_setting(
    'cal_image',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);

$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'cal_image',
        array(
            'section' => 'luzuk_premium_contactus_section',
            'settings' => 'cal_image',
            'description' => __('Recommended Image Size: 360X324', 'luzuk-premium')
        )
    )
);


lzCustomLable($wp_customize, 'luzuk_sec_Formcontpageclr', 'luzuk_premium_contactus_section', 'Form Box Color ');

$wp_customize->add_setting(
	'luzuk_contactus_shortcode',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( '[your Shortcode]' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_shortcode',
	array(
		'settings'      => 'luzuk_contactus_shortcode',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'textarea',
		'label'         => __( 'Form Shortcode Here', 'luzuk Premium' )
	)
);

addColorPalatOption($wp_customize, 'luzuk_contactus_imgbrdClr', 'luzuk_premium_contactus_section', 'Image Border Color', '#eddbbd');

addColorPalatOption($wp_customize, 'luzuk_contactus_formVGClr', 'luzuk_premium_contactus_section', 'Form Box BG Color', '#f9f8f1');

addColorPalatOption($wp_customize, 'luzuk_contactus_formborderbottomColor', 'luzuk_premium_contactus_section', 'Form Text & Placeholder Border Color', '#b7b7b6');

addColorPalatOption($wp_customize, 'luzuk_contactus_formlabelColor', 'luzuk_premium_contactus_section', 'Form Label Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_contactus_formtextplaceColor', 'luzuk_premium_contactus_section', 'Form Text & Placeholder Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_contactus_formbtnColor', 'luzuk_premium_contactus_section', 'Form Button Text Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_contactus_formbtnhoverColor', 'luzuk_premium_contactus_section', 'Form Button Text Hover Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_contactus_formbtnbgColor', 'luzuk_premium_contactus_section', 'Form Button BG Color', '#DDA759');

lzCustomLable($wp_customize, 'luzuk_sec_contactbottomarealeftbx', 'luzuk_premium_contactus_section', 'Contact Bottom Area Left Box ');

$wp_customize->add_setting(
	'luzuk_contactus_lefttitle',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( 'Come Visit Us' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_lefttitle',
	array(
		'settings'      => 'luzuk_contactus_lefttitle',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'text',
		'label'         => __( 'Title', 'luzuk Premium' )
	)
);

$wp_customize->add_setting(
	'luzuk_contactus_leftbtntxt',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( 'Plan Your Visit' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_leftbtntxt',
	array(
		'settings'      => 'luzuk_contactus_leftbtntxt',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'text',
		'label'         => __( 'Button Text', 'luzuk Premium' )
	)
);

$wp_customize->add_setting('luzuk_contactus_leftbtnlink',   
    array('default'=> 'Add Link', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('luzuk_contactus_leftbtnlink',
    array(
        'settings'      => 'luzuk_contactus_leftbtnlink',
        'section'       => 'luzuk_premium_contactus_section',
        'type'          => 'url',
        'label'         => __( 'Button Link ', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
	'luzuk_contactus_lefttxt',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( 'Lorem ipsum dolor sit amet, consectetur incididunt ut labore et dolore magna aliqua.' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_lefttxt',
	array(
		'settings'      => 'luzuk_contactus_lefttxt',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'textarea',
		'label'         => __( 'Text', 'luzuk Premium' )
	)
);

lzCustomLable($wp_customize, 'luzuk_sec_contactbottomarealeftbxClr', 'luzuk_premium_contactus_section', 'Contact Bottom Area Left Box Color');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxtitleColor', 'luzuk_premium_contactus_section', 'Title Color', '#DDA759');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxbtntxtolor', 'luzuk_premium_contactus_section', 'Button Text Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxbtntxthvrolor', 'luzuk_premium_contactus_section', 'Button Text Hover Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxbtnbgolor', 'luzuk_premium_contactus_section', 'Button BG Color', '#DDA759');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxbtnbghvrolor', 'luzuk_premium_contactus_section', 'Button BG Hover Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxbtnbrdolor', 'luzuk_premium_contactus_section', 'Button Border Color', '#DFDABA');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctleftbxtxtColor', 'luzuk_premium_contactus_section', 'Text Color', '#000');

lzCustomLable($wp_customize, 'luzuk_sec_contactbottomarearightbx', 'luzuk_premium_contactus_section', 'Contact Bottom Area Right Box ');

$wp_customize->add_setting(
	'luzuk_contactus_righttitle',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( 'Join Our Wine Club' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_righttitle',
	array(
		'settings'      => 'luzuk_contactus_righttitle',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'text',
		'label'         => __( 'Right Box Title', 'luzuk Premium' )
	)
);

$wp_customize->add_setting(
	'luzuk_contactus_rightbtntxt',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default'           => __( 'Learn More' )
	)
);
$wp_customize->add_control(
	'luzuk_contactus_rightbtntxt',
	array(
		'settings'      => 'luzuk_contactus_rightbtntxt',
		'section'       => 'luzuk_premium_contactus_section',
		'type'          => 'text',
		'label'         => __( 'Button Text', 'luzuk Premium' )
	)
);

$wp_customize->add_setting('luzuk_contactus_rightbtnlink',   
    array('default'=> 'Add Link', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('luzuk_contactus_rightbtnlink',
    array(
        'settings'      => 'luzuk_contactus_rightbtnlink',
        'section'       => 'luzuk_premium_contactus_section',
        'type'          => 'url',
        'label'         => __( 'Button Link ', 'luzuk-premium' )
    )
);

lzCustomLable($wp_customize, 'luzuk_sec_contactbottomarearightbxClr', 'luzuk_premium_contactus_section', 'Contact Bottom Area Right Box Color');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxbgColor', 'luzuk_premium_contactus_section', 'Right Box BG Color', '#f9f8f1');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxaddColor', 'luzuk_premium_contactus_section', 'Address And Phone No. Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxtitleColor', 'luzuk_premium_contactus_section', 'Title Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxbtntxtColor', 'luzuk_premium_contactus_section', 'Button Text Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxbtntxthvrColor', 'luzuk_premium_contactus_section', 'Button Text Hover Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxbtnbgColor', 'luzuk_premium_contactus_section', 'Button BG Color', '#DDA759');

addColorPalatOption($wp_customize, 'luzuk_contactus_contctrighttbxbtnbghvrColor', 'luzuk_premium_contactus_section', 'Button BG Hover Color', '#000');

lzCustomLable($wp_customize, 'luzuk_contactus_imgdisplay', 'luzuk_premium_contactus_section' , 'Top Image Setting');
 
// to show & hide another button
$wp_customize->add_setting( 'contacttop_img_display' , array( 'default' => 'show', 'transport' => 'refresh', ) ); 
$wp_customize->add_control( 'contacttop_img_display', array( 'label' => 'Image Display', 'section' => 'luzuk_premium_contactus_section', 'settings' => 'contacttop_img_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), ) ); 