<?php
function expert_construction_company_typography_setting( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
	$wp_customize->add_panel(
		'expert_construction_company_typography', array(
			'priority' => 31,
			'title' => esc_html__( 'Typography Options', 'expert-construction-company' ),
		)
	);

	/*=========================================
	Archive Post  Section
	=========================================*/
	$wp_customize->add_section(
		'expert_construction_company_typography_settings', array(
			'title' => esc_html__( 'Heading/Content Typography Options', 'expert-construction-company' ),
			'priority' => 1,
			'panel' => 'expert_construction_company_typography',
		)
	);
	$expert_construction_company_font_choices = array(
		'' => 'Select',
		'Source Sans Pro:400,700,400italic,700italic' => 'Source Sans Pro',
		'Open Sans:400italic,700italic,400,700' => 'Open Sans',
		'Oswald:400,700' => 'Oswald',
		'Playfair Display:400,700,400italic' => 'Playfair Display',
		'Montserrat:400,700' => 'Montserrat',
		'Raleway:400,700' => 'Raleway',
		'Droid Sans:400,700' => 'Droid Sans',
		'Lato:400,700,400italic,700italic' => 'Lato',
		'Arvo:400,700,400italic,700italic' => 'Arvo',
		'Lora:400,700,400italic,700italic' => 'Lora',
		'Merriweather:400,300italic,300,400italic,700,700italic' => 'Merriweather',
		'Oxygen:400,300,700' => 'Oxygen',
		'PT Serif:400,700' => 'PT Serif',
		'PT Sans:400,700,400italic,700italic' => 'PT Sans',
		'PT Sans Narrow:400,700' => 'PT Sans Narrow',
		'Cabin:400,700,400italic' => 'Cabin',
		'Fjalla One:400' => 'Fjalla One',
		'Francois One:400' => 'Francois One',
		'Josefin Sans:400,300,600,700' => 'Josefin Sans',
		'Libre Baskerville:400,400italic,700' => 'Libre Baskerville',
		'Arimo:400,700,400italic,700italic' => 'Arimo',
		'Ubuntu:400,700,400italic,700italic' => 'Ubuntu',
		'Bitter:400,700,400italic' => 'Bitter',
		'Droid Serif:400,700,400italic,700italic' => 'Droid Serif',
		'Roboto:400,400italic,700,700italic' => 'Roboto',
		'Open Sans Condensed:700,300italic,300' => 'Open Sans Condensed',
		'Roboto Condensed:400italic,700italic,400,700' => 'Roboto Condensed',
		'Roboto Slab:400,700' => 'Roboto Slab',
		'Yanone Kaffeesatz:400,700' => 'Yanone Kaffeesatz',
		'Inter:400' => 'Inter',
		'Rokkitt:400' => 'Rokkitt',
		'Damion:400' => 'Damion',
	);

	$wp_customize->add_setting( 'expert_construction_company_headings_text', array(
		'sanitize_callback' => 'expert_construction_company_sanitize_fonts',
	));

	$wp_customize->add_control( 'expert_construction_company_headings_text', array(
		'type' => 'select',
		'description' => __('Select your appropriate font for the headings.', 'expert-construction-company'),
		'section' => 'expert_construction_company_typography_settings',
		'choices' => $expert_construction_company_font_choices

	));

	$wp_customize->add_setting( 'expert_construction_company_body_text', array(
		'sanitize_callback' => 'expert_construction_company_sanitize_fonts'
	));

	$wp_customize->add_control( 'expert_construction_company_body_text', array(
		'type' => 'select',
		'description' => __( 'Select your appropriate font for the body.', 'expert-construction-company' ),
		'section' => 'expert_construction_company_typography_settings',
		'choices' => $expert_construction_company_font_choices
	) );
	
	$wp_customize->add_section(
	'expert_construction_company_dynamic_color_settings', array(
		'title' => esc_html__( 'Dynamic Color Options', 'expert-construction-company' ),
		'priority' => 1,
		'panel' => 'expert_construction_company_typography',
		)
	);

	$wp_customize->add_setting('expert_construction_company_dynamic_color_one', array(
        'default'           => '#DB9A11',
        'sanitize_callback' => 'sanitize_hex_color',
    ));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'expert_construction_company_dynamic_color_one', array(
        'label'    => __('First Dynamic Color', 'expert-construction-company'),
        'section'  => 'expert_construction_company_dynamic_color_settings',
    )));

    $wp_customize->add_setting('expert_construction_company_dynamic_color_two', array(
        'default'           => '#E1AA35',
        'sanitize_callback' => 'sanitize_hex_color',
    ));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'expert_construction_company_dynamic_color_two', array(
        'label'    => __('Second Dynamic Color', 'expert-construction-company'),
        'section'  => 'expert_construction_company_dynamic_color_settings',
    )));

	$wp_customize->add_setting( 'expert_construction_company_upgrade_page_settings_20_color',
	array(
		'sanitize_callback' => 'sanitize_text_field'
	)
	);
	$wp_customize->add_control( new Expert_Construction_Company_Control_Upgrade(
		$wp_customize, 'expert_construction_company_upgrade_page_settings_20_color',
			array(
				'priority'      => 200,
				'section'       => 'expert_construction_company_dynamic_color_settings',
				'settings'      => 'expert_construction_company_upgrade_page_settings_20_color',
				'label'         => __( 'Expert Construction Company Pro comes with additional features.', 'expert-construction-company' ),
				'choices'       => array( __( '15+ Ready-Made Sections', 'expert-construction-company' ), __( 'One-Click Demo Import', 'expert-construction-company' ), __( 'WooCommerce Integrated', 'expert-construction-company' ), __( 'Drag & Drop Section Reordering', 'expert-construction-company' ),__( 'Advanced Typography Control', 'expert-construction-company' ),__( 'Intuitive Customization Options', 'expert-construction-company' ),__( '24/7 Support', 'expert-construction-company' ), )
			)
		)
	); 

	$wp_customize->add_setting( 'expert_construction_company_upgrade_page_settings_20',
		array(
			'sanitize_callback' => 'sanitize_text_field'
		)
	);
	$wp_customize->add_control( new Expert_Construction_Company_Control_Upgrade(
		$wp_customize, 'expert_construction_company_upgrade_page_settings_20',
			array(
				'priority'      => 200,
				'section'       => 'expert_construction_company_typography_settings',
				'settings'      => 'expert_construction_company_upgrade_page_settings_20',
				'label'         => __( 'Expert Construction Company Pro comes with additional features.', 'expert-construction-company' ),
				'choices'       => array( __( '15+ Ready-Made Sections', 'expert-construction-company' ), __( 'One-Click Demo Import', 'expert-construction-company' ), __( 'WooCommerce Integrated', 'expert-construction-company' ), __( 'Drag & Drop Section Reordering', 'expert-construction-company' ),__( 'Advanced Typography Control', 'expert-construction-company' ),__( 'Intuitive Customization Options', 'expert-construction-company' ),__( '24/7 Support', 'expert-construction-company' ), )
			)
		)
	);

}

add_action( 'customize_register', 'expert_construction_company_typography_setting' );