<?php

Kirki::add_section( 'Blog_options', array(
	'title' => esc_html__( 'Blog Options', 'newshit' ),
	'panel' => 'newshit_option_layout',
) );

new \Kirki\Field\Select(
	[
		'settings' => 'blog_layout',
		'label'    => esc_html__( 'Select Blog Page Layout', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'right-sidebar',
		'choices'  => [
			'full-width'    => esc_html__( 'Full Width', 'newshit' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'newshit' ),
			'right-sidebar' => esc_html__( 'Right Sidebar', 'newshit' ),
			'grid'          => esc_html__( 'Grid Full', 'newshit' ),
			'grid-ls'       => esc_html__( 'Grid With Left Sidebar', 'newshit' ),
			'grid-rs'       => esc_html__( 'Grid With Right Sidebar', 'newshit' ),
		],
	]
);


new \Kirki\Field\Select(
	[
		'settings' => 'blog_title_tag',
		'label'    => esc_html__( 'Select Blog Title Tag', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'h2',
		'choices'  => [
			'h1'    => esc_html__( 'H1', 'newshit' ),
			'h2'    => esc_html__( 'H2', 'newshit' ),
			'h3'    => esc_html__( 'H3', 'newshit' ),
			'h4'    => esc_html__( 'H4', 'newshit' ),
			'h5'    => esc_html__( 'H5', 'newshit' ),
			'h6'    => esc_html__( 'H6', 'newshit' ),
			'p'    	=> esc_html__( 'p', 'newshit' ),
			'span'    	=> esc_html__( 'Span', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_image',
		'label'    => esc_html__( 'Enable Image', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_title',
		'label'    => esc_html__( 'Enable Title', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);
new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_dec',
		'label'    => esc_html__( 'Enable Content', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_author',
		'label'    => esc_html__( 'Enable Author Name', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_date',
		'label'    => esc_html__( 'Enable Date', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_comment',
		'label'    => esc_html__( 'Enable Comment', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_cats',
		'label'    => esc_html__( 'Enable Category', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_tags',
		'label'    => esc_html__( 'Enable Tag', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_btn',
		'label'    => esc_html__( 'Enable Read More', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Text(
	[
		'settings'        => 'btn_text',
		'label'           => esc_html__( 'Button Text', 'newshit' ),
		'section'         => 'Blog_options',
		'default'         => esc_html__( 'Continue reading', 'newshit' ),
		'active_callback' => [
			[
				'setting'  => 'enable_btn',
				'operator' => '==',
				'value'    => true,
			],
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings' => 'enable_pagination',
		'label'    => esc_html__( 'Enable Pagination', 'newshit' ),
		'section'  => 'Blog_options',
		'default'  => 'on',
		'choices'  => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Radio_Buttonset(
	[
		'settings'        => 'pagination_alignment',
		'label'           => esc_html__( 'Pagination Alignment', 'newshit' ),
		'section'         => 'Blog_options',
		'default'         => 'left',
		'choices'         => [
			'left'   => esc_html__( 'Left', 'newshit' ),
			'center' => esc_html__( 'Center', 'newshit' ),
			'right'  => esc_html__( 'Right', 'newshit' ),
		],
		'active_callback' => [
			[
				'setting'  => 'enable_pagination',
				'operator' => '==',
				'value'    => true,
			],
		],
		'transport'       => 'auto',
		'output'          => array(
			array(
				'element'  => 'nav.navigation.pagination',
				'property' => 'text-align',
			),
		),
	]
);
