<?php 
/**
 * CONTENT WITH SIDEBAR OPTIONS
 */
Kirki::add_section( 'content_with_sidebar_section', array(
	'title'    => esc_html__( 'Content With Sidebar', 'newshit' ),
	'panel'    => 'newshit_front_page_options',
) );

new \Kirki\Field\Select(
	[
		'settings'    => 'select_content_type',
		'label'       => esc_html__( 'Select Options', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'content-right',
		'choices'     => [
			'content-left' => esc_html__( 'Content With Left Sidebar', 'newshit' ),
            'content-right' => esc_html__( 'Content With Right Sidebar', 'newshit' ),
            'content' => esc_html__( 'Only Content', 'newshit' ),
		],
	]
);


new \Kirki\Field\Select(
	[
		'settings'    => 'select_home_sidebar',
		'label'       => esc_html__( 'Select Sidebar', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'sidebar-home',
		'choices'     => newshit_select_sidebar_widgets(),
		'active_callback' => [
            [
                'setting'  => 'select_content_type',
                'operator' => '!==',
                'value'    => 'content',
			]
        ],
	]
);

//==========================================
//======== Category Post Section ===========
//==========================================

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'note_category',
		'label'       => esc_html__( 'Categroy Post Section Start', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings'    => 'enable_category_section',
		'label'       => esc_html__( 'Enable Catagory Post Section', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'of',
		'choices'     => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
	]
);

new \Kirki\Field\Text(
	[
		'settings' => 'cat_section_title',
		'label'    => esc_html__( 'Section Title', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => esc_html__( 'Category Post', 'newshit' ),
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ]
        ],
		'partial_refresh'    => [
			'cat_section_title_refresh' => [
				'selector'        => '.newshit-category-post-wrapper .newshit-section-title-box',
				'render_callback' => 'newshit_customizer_quickedit',
			],
		],
	]
);

new \Kirki\Field\Checkbox_Switch(
	[
		'settings'    => 'show_by_category',
		'label'       => esc_html__( 'Show By Category', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'off',
		'choices'     => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
        'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
        ],
	]
);

new \Kirki\Field\Select(
	[
		'settings'    => 'category_post_cat',
		'label'       => esc_html__( 'Select Options', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'placeholder' => __( 'Select an Categorys', 'newshit' ),
        'multiple'    => -1,
		'choices'     => Kirki\Util\Helper::get_terms(array('taxonomy' => 'category')),
        'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'show_by_category',
                'operator' => '===',
                'value'    => true,
            ]
        ],
	]
);

new \Kirki\Field\Number(
	[
		'settings' => 'category_post_dispaly',
		'label'    => esc_html__( 'Display Item', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 5,
		'choices'  => [
			'min'  => 1,
			'max'  => 6,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'category_post_dispaly_pro',
		'label'       => esc_html__( 'Purchase Pro For Add Unlimited Item', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
        ],
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'category_post_order',
		'label'           => esc_html__( 'Post Order', 'newshit' ),
		'section'         => 'content_with_sidebar_section',
		'default'         => 'ASC',
		'placeholder'     => esc_html__( 'Choose an option', 'newshit' ),
		'choices'         => [
			'ASC'  => esc_html__( 'ASC', 'newshit' ),
			'DESE' => esc_html__( 'DESE', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
        ], 
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'category_post_orderby',
		'label'           => esc_html__( 'Post Order By', 'newshit' ),
		'section'         => 'content_with_sidebar_section',
		'default'         => 'rand',
		'placeholder'     => esc_html__( 'Choose an option', 'newshit' ),
		'choices'         => [
			'none'          => esc_html__( 'None', 'newshit' ),
			'ID'            => esc_html__( 'ID', 'newshit' ),
			'date'          => esc_html__( 'Date', 'newshit' ),
			'name'          => esc_html__( 'Name', 'newshit' ),
			'title'         => esc_html__( 'Title', 'newshit' ),
			'comment_count' => esc_html__( 'Comment count', 'newshit' ),
			'rand'          => esc_html__( 'Random', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_cat_all_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/allshow.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ]
        ],
	]
);


new \Kirki\Field\Radio_Buttonset(
	[
		'settings'    => 'category_post_settings',
		'label'       => esc_html__( 'Post Settings', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'big',
		'transport'   => 'auto',
		'choices'     => [
			'big'   => esc_html__( 'First Item', 'newshit' ),
			'small' => esc_html__( 'All Item', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
        ],
	]
);

//=================================
//======== First Item ============
//=================================


new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_cat_title_meta_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/big-cat.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'big',
            ]
        ],
	]
);


new \Kirki\Field\Number(
	[
		'settings' => 'enable_category1_title_lanth',
		'label'    => esc_html__( 'Title Lanth', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
			[
                'setting'  => 'enable_category1_title',
                'operator' => '===',
                'value'    => true,
            ],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'big',
            ]
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_category1_dec_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/big-dec.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'big',
            ]
        ],
	]
);

new \Kirki\Field\Number(
	[
		'settings' => 'enable_category1_dec_lanth',
		'label'    => esc_html__( 'Content Lanth', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'big',
            ],
			[
                'setting'  => 'enable_category1_dec',
                'operator' => '===',
                'value'    => true,
            ]
        ], 
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_category1_meta_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/big-meta.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'big',
            ]
        ],
	]
);

//==========================================
//======== Small Items Settings ============
//==========================================

new \Kirki\Field\Checkbox_Switch(
	[
		'settings'    => 'enable_category2_img',
		'label'       => esc_html__( 'Enable Image', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'on',
		'choices'     => [
			'on'  => esc_html__( 'Enable', 'newshit' ),
			'off' => esc_html__( 'Disable', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'small',
            ]
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_category2_title_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/small-title.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'small',
            ]
        ],
	]
);

new \Kirki\Field\Number(
	[
		'settings' => 'enable_category2_title_lanth',
		'label'    => esc_html__( 'Title Lanth', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
            ],
			[
                'setting'  => 'enable_category2_title',
                'operator' => '===',
                'value'    => true,
            ],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'small',
            ]
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_category2_meta_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/big-meta.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_category_section',
                'operator' => '===',
                'value'    => true,
			],
			[
                'setting'  => 'category_post_settings',
                'operator' => '===',
                'value'    => 'small',
            ]
        ],
	]
);


//==========================================
//======== Recent Post Section ===========
//==========================================

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'note_recent_post',
		'label'       => esc_html__( 'Recent Post Section Start', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
	]
);

Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_recent_post_section',
	'label'       => esc_html__( 'Enable Recent Post Section', 'newshit' ),
	'section'     => 'content_with_sidebar_section',
	'default'     => 'on',
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	
] );

new \Kirki\Field\Text(
	[
		'settings' => 'recent_section_title',
		'label'    => esc_html__( 'Section Title', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => esc_html__( 'Recent post', 'newshit' ),
        'active_callback' => [
            [
                'setting'  => 'enable_recent_post_section',
                'operator' => '===',
                'value'    => true,
            ],
        ], 
		'partial_refresh'    => [
			'recent_section_title_refresh' => [
				'selector'        => '.newshit-front-recent-post-wrapper .newshit-section-title-box',
				'render_callback' => 'newshit_customizer_quickedit',
			],
		],
	]
);

//===========================================
//========== Recent post Section Settings ============
//===========================================


Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_recent_post_filter',
	'label'       => esc_html__( 'Enable Recent Post Filter', 'newshit' ),
	'section'     => 'content_with_sidebar_section',
	'default'     => 'off',
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	'active_callback' => [
		[
			'setting'  => 'enable_recent_post_section',
			'operator' => '===',
			'value'    => true,
		],
	], 
] );

new \Kirki\Field\Select(
	[
		'settings'    => 'recent_post_select_filter',
		'label'       => esc_html__( 'Select Category Or Tags', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'one',
		'choices'     => [
			'one' => esc_html__( 'Category', 'newshit' ),
			'two' => esc_html__( 'Tags', 'newshit' ),
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
			[
				'setting'  => 'enable_recent_post_filter',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);

new Kirki\Field\Select(
	[
		'settings'    => 'front_recent_post_cat',
		'label'       => __( 'Select Categroy', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'multiple'    => -1,
		'placeholder' => __( 'Select an Categorys', 'newshit' ),
		'choices'     => Kirki\Util\Helper::get_terms(array('taxonomy' => 'category')),
		'active_callback' => [
			[
				'setting'  => 'recent_post_select_filter',
				'operator' => '===',
				'value'    => 'one',
			],
			[
				'setting'  => 'enable_recent_post_filter',
				'operator' => '===',
				'value'    => true,
			],
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'front_recent_post_tag_pro',
		'label'       => esc_html__( 'Tags Is Pro Featured', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/tags-pro.jpg',
		],
		'active_callback' => [
			[
				'setting'  => 'recent_post_select_filter',
				'operator' => '===',
				'value'    => 'two',
			],
			[
				'setting'  => 'enable_recent_post_filter',
				'operator' => '===',
				'value'    => true,
			],
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);
new \Kirki\Field\Number(
	[
		'settings' => 'front_recent_post_dispaly',
		'label'    => esc_html__( 'Display Item', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 10,
		'choices'  => [
			'min'  => 1,
			'max'  => 10,
			'step' => 1,
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);
new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'front_recent_post_dispaly_pro',
		'label'       => esc_html__( 'Purchase Pro for Add Unlimited Items', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);
new \Kirki\Field\Select(
	[
		'settings'        => 'front_recent_post_order',
		'label'           => esc_html__( 'Post Order', 'newshit' ),
		'section'         => 'content_with_sidebar_section',
		'default'         => 'ASC',
		'placeholder'     => esc_html__( 'Choose an option', 'newshit' ),
		'choices'         => [
			'ASC'  => esc_html__( 'ASC', 'newshit' ),
			'DESE' => esc_html__( 'DESE', 'newshit' ),
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'front_recent_post_postby',
		'label'           => esc_html__( 'Post Order By', 'newshit' ),
		'section'         => 'content_with_sidebar_section',
		'default'         => 'rand',
		'placeholder'     => esc_html__( 'Choose an option', 'newshit' ),
		'choices'         => [
			'none'          => esc_html__( 'None', 'newshit' ),
			'ID'            => esc_html__( 'ID', 'newshit' ),
			'date'          => esc_html__( 'Date', 'newshit' ),
			'name'          => esc_html__( 'Name', 'newshit' ),
			'title'         => esc_html__( 'Title', 'newshit' ),
			'comment_count' => esc_html__( 'Comment count', 'newshit' ),
			'rand'          => esc_html__( 'Random', 'newshit' ),
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);


//===========================================
//========== ITEM SETTING ============
//===========================================

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_cat_title_meta_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/big-cat.jpg',
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);


new \Kirki\Field\Number(
	[
		'settings' => 'front_recent_post_title_lanth',
		'label'    => esc_html__( 'Title Length', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
			[
				'setting'  => 'enable_recent_post_title',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_recent_post_meta_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/big-meta.jpg',
			'2'   => get_template_directory_uri() . '/assets/image/pro/big-dec.jpg',
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		], 
	]
);

new \Kirki\Field\Number(
	[
		'settings' => 'front_recent_post_dec_lanth',
		'label'    => esc_html__( 'Content Length', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => 5,
		'choices'  => [
			'min'  => 1,
			'max'  => 80,
			'step' => 1,
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
			[
				'setting'  => 'enable_recent_post_dec',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'enable_recent_post_readmore_pro',
		'label'       => esc_html__( 'Purchase Pro', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/recent-readmore.jpg',
		],
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section',
				'operator' => '===',
				'value'    => true,
			],
		],
	]
);

Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_recent_post_pagination',
	'label'       => esc_html__( 'Enable Pagination', 'newshit' ),
	'section'     => 'content_with_sidebar_section',
	'default'     => 'on',
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	'active_callback' => [
		[
			'setting'  => 'enable_recent_post_section',
			'operator' => '===',
			'value'    => true,
		],
	], 
] );



//====================================================
//======== Recent Section Ads Settings ============
//====================================================

Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_recent_post_section_ads',
	'label'       => esc_html__( 'Enable Ads Banner', 'newshit' ),
	'description' => esc_html__( 'Enable Ads Banner For Recent Post Section', 'newshit' ),
	'section'     => 'content_with_sidebar_section',
	'default'     => 'off',
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	
] );



new \Kirki\Field\Select(
	[
		'settings'    => 'recent_post_section_ads_type',
		'label'       => esc_html__( 'Select Ads Type', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
		'default'     => 'link',
		'active_callback' => [
			[
				'setting'  => 'enable_recent_post_section_ads',
				'operator' => '===',
				'value'    => true,
			]
		],
		'choices'     => [
			'link' => esc_html__( 'Link', 'newshit' ),
			'code' => esc_html__( 'Code', 'newshit' ),
		],
		'partial_refresh'    => [
			'recent_post_section_ads_type_refresh' => [
				'selector'        => '.newshit-recent-post-section-ads-wrapper',
				'render_callback' => 'newshit_customizer_quickedit',
			],
		],
	]
);

new \Kirki\Field\Image(
	[
		'settings'    => 'recent_post_section_ads_image',
		'label'       => esc_html__( 'Upload Ads image', 'newshit' ),
		'section'     => 'content_with_sidebar_section',
        'active_callback' => [
			[
				'setting'  => 'recent_post_section_ads_type',
				'operator' => '===',
				'value'    => 'link',
			],
			[
				'setting'  => 'enable_recent_post_section_ads',
				'operator' => '===',
				'value'    => true,
			]
		],
        'choices'     => [
			'save_as' => 'array',
		],
	]
);

new \Kirki\Field\URL(
	[
		'settings' => 'recent_post_section_ads_url',
		'label'    => esc_html__( 'Ads URL', 'newshit' ),
		'section'  => 'content_with_sidebar_section',
		'default'  => '#',
        'active_callback' => [
			[
				'setting'  => 'recent_post_section_ads_type',
				'operator' => '===',
				'value'    => 'link',
			],
			[
				'setting'  => 'enable_recent_post_section_ads',
				'operator' => '===',
				'value'    => true,
			]
		], 
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'recent_post_section_ads_pro',
		'label'       => esc_html__( 'Code Is Pro Featured', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'content_with_sidebar_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/ads-code.jpg',
		],
		'active_callback' => [
			[
				'setting'  => 'recent_post_section_ads_type',
				'operator' => '===',
				'value'    => 'code',
			],
			[
				'setting'  => 'enable_recent_post_section_ads',
				'operator' => '===',
				'value'    => true,
			]
		],
	]
);

