<?php
/**
 * Header Section
 *
 * @package technology_software_firm
 */

// ---------------------------------------- HEADER OPTIONS ----------------------------------------------------

$wp_customize->add_section(
	'technology_software_firm_header_options',
	array(
		'panel' => 'technology_software_firm_front_page_options',
		'title' => esc_html__( 'Header Options', 'technology-software-firm' ),
        'priority' => 1,
	)
);

// Add Separator Custom Control
$wp_customize->add_setting( 'technology_software_firm_menu_separator', array(
	'sanitize_callback' => 'sanitize_text_field',
));

$wp_customize->add_control( new Technology_Software_Firm_Separator_Custom_Control( $wp_customize, 'technology_software_firm_menu_separator', array(
	'label' => __( 'Menu Settings', 'technology-software-firm' ),
	'section' => 'technology_software_firm_header_options',
	'settings' => 'technology_software_firm_menu_separator',
)));

$wp_customize->add_setting( 'technology_software_firm_menu_font_size', array(
    'default'           => 14,
    'sanitize_callback' => 'absint',
));

// Add control for site title size
$wp_customize->add_control( 'technology_software_firm_menu_font_size', array(
    'type'        => 'number',
    'section'     => 'technology_software_firm_header_options',
    'label'       => __( 'Menu Font Size ', 'technology-software-firm' ),
    'input_attrs' => array(
        'min'  => 10,
        'max'  => 100,
        'step' => 1,
    ),
));

// Add setting for menu font weight
$wp_customize->add_setting('technology_software_firm_menu_font_weight', array(
    'default'           => '400',
    'sanitize_callback' => 'sanitize_text_field',
));

// Add control for menu font weight
$wp_customize->add_control('technology_software_firm_menu_font_weight', array(
    'type'     => 'select',
    'section'  => 'technology_software_firm_header_options', 
    'label'    => __('Menu Font Weight', 'technology-software-firm'),
    'choices'  => array(
		'100' => __('100','technology-software-firm'),
		'200' => __('200','technology-software-firm'),
		'300' => __('300','technology-software-firm'),
		'400' => __('400','technology-software-firm'),
		'500' => __('500','technology-software-firm'),
		'600' => __('600','technology-software-firm'),
		'700' => __('700','technology-software-firm'),
		'800' => __('800','technology-software-firm'),
		'900' => __('900','technology-software-firm'),
    ),
));

$wp_customize->add_setting( 'technology_software_firm_menu_text_transform', array(
    'default'           => 'capitalize', // Default value for text transform
    'sanitize_callback' => 'sanitize_text_field',
) );

// Add control for menu text transform
$wp_customize->add_control( 'technology_software_firm_menu_text_transform', array(
    'type'     => 'select',
    'section'  => 'technology_software_firm_header_options', // Adjust the section as needed
    'label'    => __( 'Menu Text Transform', 'technology-software-firm' ),
    'choices'  => array(
        'none'       => __( 'None', 'technology-software-firm' ),
        'capitalize' => __( 'Capitalize', 'technology-software-firm' ),
        'uppercase'  => __( 'Uppercase', 'technology-software-firm' ),
        'lowercase'  => __( 'Lowercase', 'technology-software-firm' ),
    ),
) );

// Menu Text Color 
$wp_customize->add_setting(
	'technology_software_firm_menu_text_color', 
	array(
		'default' => '#ffffff',
		'sanitize_callback' => 'sanitize_hex_color',
	)
);

$wp_customize->add_control(
	new WP_Customize_Color_Control(
		$wp_customize, 
		'technology_software_firm_menu_text_color', 
		array(
			'label' => __('Menu Color', 'technology-software-firm'),
			'section' => 'technology_software_firm_header_options',
		)
	)
);

// Sub Menu Text Color 
$wp_customize->add_setting(
	'technology_software_firm_sub_menu_text_color', 
	array(
		'default' => '#6DE1F8',
		'sanitize_callback' => 'sanitize_hex_color',
	)
);

$wp_customize->add_control(
	new WP_Customize_Color_Control(
		$wp_customize, 
		'technology_software_firm_sub_menu_text_color', 
		array(
			'label' => __('Sub Menu Color', 'technology-software-firm'),
			'section' => 'technology_software_firm_header_options',
		)
	)
);

// Topbar Padding Setting
$wp_customize->add_setting('technology_software_firm_topbar_padding',array(
		'default' => '',
		'sanitize_callback' => 'absint'
	)
);
$wp_customize->add_control('technology_software_firm_topbar_padding',array(
		'label' => __('Topbar Padding','technology-software-firm'),
		'section' => 'technology_software_firm_header_options',
		'type' => 'number',
		'input_attrs' => array(
			'min' => 0,
			'max' => 50,
			'step' => 1
		)
	)
);
