<?php 

Kirki::add_section( 'header_bottom_section', array(
	'title'    => esc_html__( 'Header Bottom', 'newshit' ),
	'panel'    => 'header_options',
) );

// Header Bottom Background Color

new \Kirki\Field\Color(
	[
		'settings'    => 'header_bottom_bg',
		'label'       => __( 'Background Color', 'newshit' ),
		'description' => esc_html__( 'Add Header Menu Area Background Color', 'newshit' ),
		'section'     => 'header_bottom_section',
        'transport' => 'auto',
        'default'   => '#2816F8',
        'output' => array(
            array(
                'element'  => '.header-menu-wrapper',
                'property' => 'background-color',
            ),
        ),
	]
);

// Menu Color Options 
new \Kirki\Field\Radio_Buttonset(
	[
		'settings'    => 'header_bottom_menu_colors',
		'label'       => esc_html__( 'Header Menu Color Options', 'newshit' ),
		'section'     => 'header_bottom_section',
		'default'     => 'one',
		'transport'   => 'auto',
		'choices'     => [
			'one'   => esc_html__( 'Perent Menu', 'newshit' ),
			'two' => esc_html__( 'Sub Menu', 'newshit' ),
		],
	]
);

// Parent Menu Color Options

Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_menu_color',
	'label'       => __( 'Menu Color', 'newshit' ),
	'description' => esc_html__( 'Add perent menu Color Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'default'	  => '#ffffff',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'one',
		]
	],
	'output' => array(
		array(
			'element'  => '.main-navigation .navbar-collapse.nav-menu > ul > li > a',
			'property' => 'color',
		),
	),
) );

Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_menu_hcolor',
	'label'       => __( 'Menu hover Color', 'newshit' ),
	'description' => esc_html__( 'Add perent menu hover Color Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'default'	  => '#ffffff',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'one',
		]
	],
	'output' => array(
		array(
			'element'  => '.main-navigation .navbar-collapse.nav-menu > ul > li > a:hover',
			'property' => 'color',
		),
	),
) );

Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_menu_bg',
	'label'       => __( 'Hover BG Color', 'newshit' ),
	'description' => esc_html__( 'Add perent menu hover Backgrond, Active Color Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'default' 		=> '#18181B',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'one',
		]
	],
	'output' => array(
		array(
			'element'  => array('.main-navigation .navbar-collapse.nav-menu > ul > li > a:hover','.main-navigation .navbar-collapse.nav-menu > ul > li.current-menu-item > a','.main-navigation .navbar-collapse.nav-menu > ul > li.current_page_item > a','.main-navigation .navbar-collapse.nav-menu > ul > li.current-menu-item > a:hover','.main-navigation .navbar-collapse.nav-menu > ul > li.current_page_item > a:hover'),
			'property' => 'background-color',
		),
	),
) );


// Sub Menu Color Options

Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_submenu_color',
	'label'       => __( 'Sub Menu Color', 'newshit' ),
	'description' => esc_html__( 'Add Sub menu Color Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'two',
		]
	],
	'output' => array(
		array(
			'element'  => '.main-navigation .navbar-collapse.nav-menu ul ul a',
			'property' => 'color',
		),
	),
) );


Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_submenu_bg',
	'label'       => __( 'Sub Menu BG Color', 'newshit' ),
	'description' => esc_html__( 'Add Sub menu Color Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'two',
		]
	],
	'output' => array(
		array(
			'element'  => '.main-navigation .navbar-collapse.nav-menu ul ul a',
			'property' => 'background-color',
		),
	),
) );

// Sub Menu Hover 

Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_submenu_hcolor',
	'label'       => __( 'Sub Menu Color', 'newshit' ),
	'description' => esc_html__( 'Add Sub Menu Hover Color Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'two',
		]
	],
	'output' => array(
		array(
			'element'  => '.main-navigation .navbar-collapse.nav-menu ul ul a:hover',
			'property' => 'color',
		),
	),
) );


Kirki::add_field( 'theme_config', array(
	'type'        => 'color',
	'settings'    => 'header_buttom_submenu_hbg',
	'label'       => __( 'Sub Menu Color', 'newshit' ),
	'description' => esc_html__( 'Add Sub Menu Hover BG Here', 'newshit' ),
	'section'     => 'header_bottom_section',
	'transport'   => 'auto',
	'active_callback' => [
		[
			'setting'  => 'header_bottom_menu_colors',
			'operator' => '==',
			'value'    => 'two',
		]
	],
	'output' => array(
		array(
			'element'  => '.main-navigation .navbar-collapse.nav-menu ul ul a:hover',
			'property' => 'background-color',
		),
	),
) );


// Dark And Light Mode Options

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'header_dark_pro',
		'label'       => esc_html__( 'only Enable For Free Version', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'header_bottom_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'header_dark_img'   => get_template_directory_uri() . '/assets/image/pro/dark-mode.jpg',
		],
	]
);


// Notification Options
new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'header_message_pro',
		'label'       => esc_html__( 'Only Enable For Free Version', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'header_bottom_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'header_message_img'   => get_template_directory_uri() . '/assets/image/pro/notification.jpg',
		],
	]
);

new \Kirki\Field\URL(
	[
		'settings' => 'header_notification_url',
		'label'    => esc_html__( 'Notification URL', 'newshit' ),
		'section'  => 'header_bottom_section',
		'default'  => '#',
        'active_callback' => [
			[
				'setting'  => 'header_notification',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);

new \Kirki\Field\Checkbox(
	[
		'settings'    => 'notification_new_tab',
		'label'       => esc_html__( 'Open New Tab?', 'newshit' ),
		'section'     => 'header_bottom_section',
        'active_callback' => [
			[
				'setting'  => 'header_notification',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);


// Search Options 
new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'header_search_pro',
		'label'       => esc_html__( 'Only Enable For Free Version', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'header_bottom_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'header_message_img'   => get_template_directory_uri() . '/assets/image/pro/search.jpg',
		],
	]
);