<?php

Kirki::add_section( 'footer_options', array(
	'title' => esc_html__( 'Footer Options', 'newscope' ),
	'panel' => 'newscope_theme_options',
) );

Kirki::add_field( 'theme_config', [
	'type'        => 'radio_image',
	'settings'    => 'select_footer',
	'label'       => esc_html__( 'Select Footer', 'newscope' ),
	'description' => esc_html__( 'Select Your Footer', 'newscope' ),
	'section'     => 'footer_options',
	'default'     => 'one',
	'priority'    => 10,
	'choices'     => [
		'one' => get_template_directory_uri() . '/assets/image/footer-1.jpg',
	],
] );

Kirki::add_field( 'theme_config', array(
	'type'     => 'cnote',
	'section'  => 'footer_options',
	'label'    => __( 'Footer Widget Layout Settings', 'newscope' ),
	'settings' => 'fnote1',
	'priority' => 11,
) );

// pro
new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'footer_widget_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newscope' ),
		'description' => newscope_purchase_link(),
		'section'     => 'footer_options',
		'default'     => '',
		'transport'   => 'auto',
		'priority' => 12,
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/widgets.jpg',
		],
	]
);

Kirki::add_field( 'theme_config', array(
	'type'     => 'cnote',
	'section'  => 'footer_options',
	'label'    => __( 'Footer Background Settings', 'newscope' ),
	'settings' => 'fnote2',
	'priority' => 13,
) );


new \Kirki\Field\Background(
	[
		'settings'    => 'footer_background',
		'label'       => esc_html__('Footer Background Options', 'newscope'),
		'description' => esc_html__('Add Footer background color or image', 'newscope'),
		'section'     => 'footer_options',
		'default'     => [
			'background-color'      => '#FFF6E9',
			'background-image'      => '',
			'background-repeat'     => 'repeat',
			'background-position'   => 'center center',
			'background-size'       => 'cover',
			'background-attachment' => 'scroll',
		],
		'transport'   => 'auto',
		'priority'        => 14,
		'output'      => [
			[
				'element' => '.footer-content',
			],
		], 
	]
);

Kirki::add_field( 'theme_config', array(
	'type'     => 'cnote',
	'section'  => 'footer_options',
	'label'    => __( 'Color Options', 'newscope' ),
	'settings' => 'fnote2',
	'priority' => 15,
) );

new \Kirki\Field\Color(
	[
		'settings'  => 'footer_title_color',
		'label'     => __( 'Title Color', 'newscope' ),
		'section'   => 'footer_options',
		'priority'  => 16,
		'transport' => 'auto',
		'output'    => [
			[
				'element'  => '.footer-wrapper .footer-widget-area .widget-title, .footer-wrapper .footer-widget-area .widget_block h2,.footer-widget-area .widget.widget_rss cite',
				'property' => 'color',
			],
		],
	]
);

new \Kirki\Field\Color(
	[
		'settings'  => 'footer_content_color',
		'label'     => __( 'Content Color', 'newscope' ),
		'section'   => 'footer_options',
		'priority'  => 17,
		'transport' => 'auto',
		'output'    => [
			[
				'element'  => '.footer-widget, .footer-widget p,.footer-widget-area .widget ul li',
				'property' => 'color',
			],
		],
	]
);

new \Kirki\Field\Color(
	[
		'settings'  => 'footer_link_color',
		'label'     => __( 'Link Color', 'newscope' ),
		'section'   => 'footer_options',
		'priority'  => 18,
		'transport' => 'auto',
		'output'    => [
			[
				'element'  => '.footer-widget a, .footer-widget ul li a,.footer-widget-area .widget.widget_rss ul li a, .footer-widget-area .widget.widget_rss .rss-date',
				'property' => 'color',
			],
			[
				'element'  => '.footer-widget-area .widget.widget_archive li a:before, .footer-widget-area .wp-block-archives-list li a:before, .footer-widget-area .widget.widget_categories li a:before, .footer-widget-area .wp-block-categories-list li a:before, .footer-widget-area .widget.widget_pages li a:before, .footer-widget-area .widget.widget_meta li a:before, .footer-widget-area .widget.widget_nav_menu li a:before, .footer-widget-area .widget_recent_comments li:before, .footer-widget-area .widget_recent_entries li a:before, .footer-widget-area .wp-block-latest-posts__list li a:before, .footer-widget-area .wp-block-pages-list__item__link:before',
				'property' => 'background-color',
			],
		],
	]
);
new \Kirki\Field\Color(
	[
		'settings'  => 'footer_link_hcolor',
		'label'     => __( 'Link Hover Color', 'newscope' ),
		'section'   => 'footer_options',
		'priority'  => 19,
		'transport' => 'auto',
		'output'    => [
			[
				'element'  => '.footer-widget a:hover, .footer-widget ul li a:hover,.footer-widget-area .widget.widget_rss ul li a:hover',
				'property' => 'color',
			],
			[
				'element'  => '.footer-widget-area .widget.widget_archive li a:hover:before, .footer-widget-area .widget.widget_categories li a:hover:before, .footer-widget-area .widget.widget_pages li a:hover:before, .footer-widget-area .widget.widget_meta li a:hover:before, .footer-widget-area .widget.widget_nav_menu li a:hover:before, .footer-widget-area .widget_recent_entries li a:hover:before, .footer-widget-area .wp-block-latest-posts__list li a:hover:before, .footer-widget-area .wp-block-categories-list li a:hover:before, .footer-widget-area .wp-block-archives-list li a:hover:before, .footer-widget-area .wp-block-pages-list__item__link:hover:before',
				'property' => 'background-color',
			],
		],
	]
);