<?php 
/**
 * THREE BOX SECTION SETTINGS
 */
Kirki::add_section( 'front_three_box_section', array(
	'title'    => esc_html__( 'Three Box Section', 'newshit' ),
	'panel'    => 'newshit_front_page_options',
) );

Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_three_box_section',
	'label'       => esc_html__( 'Enable Three Box Section', 'newshit' ),
	'section'     => 'front_three_box_section',
	'default'     => 'off',
    'priority'        => 1,
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
    'partial_refresh'    => [
        'box1_title_refresh' => [
            'selector'        => '.newshit-box-items',
            'render_callback' => 'newshit_customizer_quickedit',
        ],
    ],
] );

new \Kirki\Field\Radio_Buttonset(
	[
		'settings'    => 'select_three_boxs',
		'label'       => esc_html__( 'Select Box Item', 'newshit'  ),
		'section'     => 'front_three_box_section',
		'default'     => 'one',
        'transport'   => 'auto',
        'priority'        => 1,
		'choices'     => [
			'one'   => esc_html__( 'Box One', 'newshit'  ),
			'two' => esc_html__( 'Box Two', 'newshit'  ),
			'three'  => esc_html__( 'Box Three', 'newshit'  ),
		],
        'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ]
        ],
	]
);


//===========================================
//========== Box Options One ============
//===========================================

new \Kirki\Field\Text(
	[
		'settings' => 'box1_title',
		'label'    => esc_html__( 'Section Title', 'newshit'  ),
		'section'  => 'front_three_box_section',
		'default'  => esc_html__( 'Sports', 'newshit'  ),
        'priority'        => 1,
        'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ]
        ],
        
	]
);

new \Kirki\Field\Select(
	[
		'settings'    => 'box1_post_type',
		'label'       => esc_html__( 'Select Post Type', 'newshit' ),
		'section'     => 'front_three_box_section',
		'description' => esc_html__( 'Select Your Post Type Blog Post Or Web Stories', 'newshit' ),
		'default'     => 'post',
		'priority'        => 1,
		'choices'     => [
			'post' => esc_html__( 'Blog Post', 'newshit' ),
			'web-story' => esc_html__( 'Web Stories', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ]
		], 
	]
);
// Start Web Stories Filter

if ( is_plugin_active( 'web-stories/web-stories.php' ) ) {

	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'box1_story_pro',
			'label'       => esc_html__( 'This Featured For Pro', 'newshit' ),
			'description' => newshit_purchase_link(),
			'section'     => 'front_three_box_section',
			'default'     => '',
			'transport'   => 'auto',
			'priority'        => 1,
			'choices'     => [
				'sticker_pro_img'   => get_template_directory_uri() . '/assets/image/pro/story.jpg',
			],
			'active_callback' => [
				[
                    'setting'  => 'enable_three_box_section',
                    'operator' => '===',
                    'value'    => true,
                ],
                [
                    'setting'  => 'select_three_boxs',
                    'operator' => '===',
                    'value'    => 'one',
                ],
				[
					'setting'  => 'box1_post_type',
					'operator' => '===',
					'value'    => 'web-story',
				],
			],
		]
	);
	
	
}else{
	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'news_box1_no_plugine',
			'label'       => esc_html__( 'You Have No Active Or Install Web Stories Plugin ', 'newshit' ),
			'section'     => 'front_three_box_section',
			'default'     => '',
			'transport'   => 'auto',
			'priority'        => 1,
			'active_callback' => [
                [
                    'setting'  => 'enable_three_box_section',
                    'operator' => '===',
                    'value'    => true,
                ],
                [
                    'setting'  => 'select_three_boxs',
                    'operator' => '===',
                    'value'    => 'one',
                ],
                [
                    'setting'  => 'box1_post_type',
                    'operator' => '===',
                    'value'    => 'web-story',
                ],
            ], 
		]
	);
}
// End Web Stories Filter 

Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_box1_post_filter',
	'label'       => esc_html__( 'Enable Post Filter', 'newshit' ),
	'section'     => 'front_three_box_section',
	'default'     => 'off',
    'priority'        => 1,
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	'active_callback' => [
        [
            'setting'  => 'enable_three_box_section',
            'operator' => '===',
            'value'    => true,
        ],
        [
            'setting'  => 'select_three_boxs',
            'operator' => '===',
            'value'    => 'one',
        ],
        [
            'setting'  => 'box1_post_type',
            'operator' => '===',
            'value'    => 'post',
        ],
    ],
] );


new \Kirki\Field\Select(
	[
		'settings'    => 'box1_post_filter',
		'label'       => esc_html__( 'Select Category Or Tags', 'newshit' ),
		'section'     => 'front_three_box_section',
		'default'     => 'one',
        'priority'        => 1,
		'choices'     => [
			'one' => esc_html__( 'Category', 'newshit' ),
			'two' => esc_html__( 'Tags', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ],
            [
                'setting'  => 'enable_box1_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box1_post_type',
                'operator' => '===',
                'value'    => 'post',
            ],
        ],
	]
);

new Kirki\Field\Select(
	[
		'settings'    => 'box1_post_cat',
		'label'       => __( 'Select Categroy', 'newshit' ),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'multiple'    => -1,
        'priority'        => 1,
		'placeholder' => __( 'Select an Categorys', 'newshit' ),
		'choices'     => Kirki\Util\Helper::get_terms(array('taxonomy' => 'category')),
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ],
            [
                'setting'  => 'enable_box1_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box1_post_filter',
                'operator' => '===',
                'value'    => 'one',
            ],
            [
                'setting'  => 'box1_post_type',
                'operator' => '===',
                'value'    => 'post',
            ],
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'box1_post_tag_pro',
		'label'       => esc_html__( 'Tags Is Pro Featured', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'transport'   => 'auto',
        'priority'        => 1,
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/tags-pro.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ],
            [
                'setting'  => 'enable_box1_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box1_post_filter',
                'operator' => '===',
                'value'    => 'two',
            ],
            [
                'setting'  => 'box1_post_type',
                'operator' => '===',
                'value'    => 'post',
            ],
        ], 
	]
);


new \Kirki\Field\Select(
	[
		'settings'        => 'box1_post_order',
		'label'           => esc_html__( 'Post Order', 'newshit' ),
		'section'         => 'front_three_box_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_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ],
        ], 
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'box1_post_orderby',
		'label'           => esc_html__( 'Post Order By', 'newshit' ),
		'section'         => 'front_three_box_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_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ]
        ],
	]
);

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

new \Kirki\Field\Number(
	[
		'settings' => 'box1_title_lanth',
		'label'    => esc_html__( 'Title Length', 'newshit' ),
		'section'  => 'front_three_box_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ]
        ],
	]
);

new \Kirki\Field\Number(
	[
		'settings' => 'box1_dispaly_item',
		'label'    => esc_html__( 'Dispaly Item', 'newshit' ),
		'section'  => 'front_three_box_section',
		'default'  => 4,
		'choices'  => [
			'min'  => 1,
			'max'  => 6,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ]
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'box1_dispaly_item_pro',
		'label'       => esc_html__( 'Purchase Pro for Add Unlimited Items', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'transport'   => 'auto',
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'one',
            ]
        ],
	]
);

//===========================================
//========== Box Options Two ============
//===========================================

new \Kirki\Field\Text(
	[
		'settings' => 'box2_title',
		'label'    => esc_html__( 'Section Title', 'newshit'  ),
		'section'  => 'front_three_box_section',
		'default'  => esc_html__( 'Health', 'newshit'  ),
        'priority'        => 1,
        'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ]
        ],
	]
);

new \Kirki\Field\Select(
	[
		'settings'    => 'box2_post_type',
		'label'       => esc_html__( 'Select Post Type', 'newshit' ),
		'section'     => 'front_three_box_section',
		'description' => esc_html__( 'Select Your Post Type Blog Post Or Web Stories', 'newshit' ),
		'default'     => 'post',
		'priority'        => 1,
		'choices'     => [
			'post' => esc_html__( 'Blog Post', 'newshit' ),
			'web-story' => esc_html__( 'Web Stories', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ]
		], 
	]
);
// Start Web Stories Filter

if ( is_plugin_active( 'web-stories/web-stories.php' ) ) {

	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'box2_story_pro',
			'label'       => esc_html__( 'This Featured For Pro', 'newshit' ),
			'description' => newshit_purchase_link(),
			'section'     => 'front_three_box_section',
			'default'     => '',
			'transport'   => 'auto',
			'priority'        => 1,
			'choices'     => [
				'sticker_pro_img'   => get_template_directory_uri() . '/assets/image/pro/story.jpg',
			],
			'active_callback' => [
				[
                    'setting'  => 'enable_three_box_section',
                    'operator' => '===',
                    'value'    => true,
                ],
                [
                    'setting'  => 'select_three_boxs',
                    'operator' => '===',
                    'value'    => 'two',
                ],
				[
					'setting'  => 'box2_post_type',
					'operator' => '===',
					'value'    => 'web-story',
				],
			],
		]
	);
	
	
}else{
	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'news_box2_no_plugine',
			'label'       => esc_html__( 'You Have No Active Or Install Web Stories Plugin ', 'newshit' ),
			'section'     => 'front_three_box_section',
			'default'     => '',
			'transport'   => 'auto',
			'priority'        => 1,
			'active_callback' => [
                [
                    'setting'  => 'enable_three_box_section',
                    'operator' => '===',
                    'value'    => true,
                ],
                [
                    'setting'  => 'select_three_boxs',
                    'operator' => '===',
                    'value'    => 'two',
                ],
                [
                    'setting'  => 'box2_post_type',
                    'operator' => '===',
                    'value'    => 'web-story',
                ],
            ], 
		]
	);
}
// End Web Stories Filter 

Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_box2_post_filter',
	'label'       => esc_html__( 'Enable Post Filter', 'newshit' ),
	'section'     => 'front_three_box_section',
	'default'     => 'off',
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	'active_callback' => [
        [
            'setting'  => 'enable_three_box_section',
            'operator' => '===',
            'value'    => true,
        ],
        [
            'setting'  => 'select_three_boxs',
            'operator' => '===',
            'value'    => 'two',
        ],
        [
            'setting'  => 'box2_post_type',
            'operator' => '===',
            'value'    => 'post',
        ],
    ],
] );


new \Kirki\Field\Select(
	[
		'settings'    => 'box2_post_filter',
		'label'       => esc_html__( 'Select Category Or Tags', 'newshit' ),
		'section'     => 'front_three_box_section',
		'default'     => 'one',
		'choices'     => [
			'one' => esc_html__( 'Category', 'newshit' ),
			'two' => esc_html__( 'Tags', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ],
            [
                'setting'  => 'enable_box2_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box2_post_type',
                'operator' => '===',
                'value'    => 'post',
            ],
        ],
	]
);

new Kirki\Field\Select(
	[
		'settings'    => 'box2_post_cat',
		'label'       => __( 'Select Categroy', 'newshit' ),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'multiple'    => -1,
		'placeholder' => __( 'Select an Categorys', 'newshit' ),
		'choices'     => Kirki\Util\Helper::get_terms(array('taxonomy' => 'category')),
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ],
            [
                'setting'  => 'enable_box2_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box2_post_filter',
                'operator' => '===',
                'value'    => 'one',
            ],
            [
                'setting'  => 'box2_post_type',
                'operator' => '===',
                'value'    => 'post',
            ],
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'box2_post_tag_pro',
		'label'       => esc_html__( 'Tags Is Pro Featured', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/tags-pro.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ],
            [
                'setting'  => 'enable_box2_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box2_post_filter',
                'operator' => '===',
                'value'    => 'two',
            ],
            [
                'setting'  => 'box2_post_type',
                'operator' => '===',
                'value'    => 'post',
            ],
        ],
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'box2_post_order',
		'label'           => esc_html__( 'Post Order', 'newshit' ),
		'section'         => 'front_three_box_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_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ],
        ], 
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'box2_post_orderby',
		'label'           => esc_html__( 'Post Order By', 'newshit' ),
		'section'         => 'front_three_box_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_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ]
        ],
	]
);

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


new \Kirki\Field\Number(
	[
		'settings' => 'box2_title_lanth',
		'label'    => esc_html__( 'Title Length', 'newshit' ),
		'section'  => 'front_three_box_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ]
        ],
	]
);


new \Kirki\Field\Number(
	[
		'settings' => 'box2_dispaly_item',
		'label'    => esc_html__( 'Dispaly Item', 'newshit' ),
		'section'  => 'front_three_box_section',
		'default'  => 4,
		'choices'  => [
			'min'  => 1,
			'max'  => 6,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ]
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'box2_dispaly_item_pro',
		'label'       => esc_html__( 'Purchase Pro for Add Unlimited Items', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'transport'   => 'auto',
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'two',
            ]
        ],
	]
);
//===========================================
//========== Box Options Three ============
//===========================================


new \Kirki\Field\Text(
	[
		'settings' => 'box3_title',
		'label'    => esc_html__( 'Section Title', 'newshit'  ),
		'section'  => 'front_three_box_section',
		'default'  => esc_html__( 'Technology', 'newshit'  ),
        'priority'        => 1,
        'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ]
        ],
	]
);

new \Kirki\Field\Select(
	[
		'settings'    => 'box3_post_type',
		'label'       => esc_html__( 'Select Post Type', 'newshit' ),
		'section'     => 'front_three_box_section',
		'description' => esc_html__( 'Select Your Post Type Blog Post Or Web Stories', 'newshit' ),
		'default'     => 'post',
		'priority'        => 1,
		'choices'     => [
			'post' => esc_html__( 'Blog Post', 'newshit' ),
			'web-story' => esc_html__( 'Web Stories', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ]
		], 
	]
);
// Start Web Stories Filter

if ( is_plugin_active( 'web-stories/web-stories.php' ) ) {

	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'box3_story_pro',
			'label'       => esc_html__( 'This Featured For Pro', 'newshit' ),
			'description' => newshit_purchase_link(),
			'section'     => 'front_three_box_section',
			'default'     => '',
			'transport'   => 'auto',
			'priority'        => 1,
			'choices'     => [
				'sticker_pro_img'   => get_template_directory_uri() . '/assets/image/pro/story.jpg',
			],
			'active_callback' => [
				[
                    'setting'  => 'enable_three_box_section',
                    'operator' => '===',
                    'value'    => true,
                ],
                [
                    'setting'  => 'select_three_boxs',
                    'operator' => '===',
                    'value'    => 'three',
                ],
				[
					'setting'  => 'box3_post_type',
					'operator' => '===',
					'value'    => 'web-story',
				],
			],
		]
	);
	
	
}else{
	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'news_box3_no_plugine',
			'label'       => esc_html__( 'You Have No Active Or Install Web Stories Plugin ', 'newshit' ),
			'section'     => 'front_three_box_section',
			'default'     => '',
			'transport'   => 'auto',
			'priority'        => 1,
			'active_callback' => [
                [
                    'setting'  => 'enable_three_box_section',
                    'operator' => '===',
                    'value'    => true,
                ],
                [
                    'setting'  => 'select_three_boxs',
                    'operator' => '===',
                    'value'    => 'three',
                ],
                [
                    'setting'  => 'box3_post_type',
                    'operator' => '===',
                    'value'    => 'web-story',
                ],
            ], 
		]
	);
}
// End Web Stories Filter 



Kirki::add_field( 'theme_config', [
	'type'        => 'switch',
	'settings'    => 'enable_box3_post_filter',
	'label'       => esc_html__( 'Enable Post Filter', 'newshit' ),
	'section'     => 'front_three_box_section',
	'default'     => 'off',
	'choices'     => [
		'on'  => esc_html__( 'Enable', 'newshit' ),
		'off' => esc_html__( 'Disable', 'newshit' ),
	],
	'active_callback' => [
        [
            'setting'  => 'enable_three_box_section',
            'operator' => '===',
            'value'    => true,
        ],
        [
            'setting'  => 'select_three_boxs',
            'operator' => '===',
            'value'    => 'three',
        ],
        [
            'setting'  => 'box3_post_type',
            'operator' => '===',
            'value'    => 'post',
        ]
    ],
] );


new \Kirki\Field\Select(
	[
		'settings'    => 'box3_post_filter',
		'label'       => esc_html__( 'Select Category Or Tags', 'newshit' ),
		'section'     => 'front_three_box_section',
		'default'     => 'one',
		'choices'     => [
			'one' => esc_html__( 'Category', 'newshit' ),
			'two' => esc_html__( 'Tags', 'newshit' ),
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ],
            [
                'setting'  => 'enable_box3_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box3_post_type',
                'operator' => '===',
                'value'    => 'post',
            ]
        ],
	]
);

new Kirki\Field\Select(
	[
		'settings'    => 'box3_post_cat',
		'label'       => __( 'Select Categroy', 'newshit' ),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'multiple'    => -1,
		'placeholder' => __( 'Select an Categorys', 'newshit' ),
		'choices'     => Kirki\Util\Helper::get_terms(array('taxonomy' => 'category')),
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ],
            [
                'setting'  => 'enable_box3_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box3_post_filter',
                'operator' => '===',
                'value'    => 'one',
            ],
            [
                'setting'  => 'box3_post_type',
                'operator' => '===',
                'value'    => 'post',
            ]
        ],
	]
);

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'box3_post_tag_pro',
		'label'       => esc_html__( 'Tags Is Pro Featured', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'transport'   => 'auto',
		'choices'     => [
			'1'   => get_template_directory_uri() . '/assets/image/pro/tags-pro.jpg',
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ],
            [
                'setting'  => 'enable_box3_post_filter',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'box3_post_filter',
                'operator' => '===',
                'value'    => 'two',
            ],
            [
                'setting'  => 'box3_post_type',
                'operator' => '===',
                'value'    => 'post',
            ]
        ], 
	]
);


new \Kirki\Field\Select(
	[
		'settings'        => 'box3_post_order',
		'label'           => esc_html__( 'Post Order', 'newshit' ),
		'section'         => 'front_three_box_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_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ],
        ], 
	]
);

new \Kirki\Field\Select(
	[
		'settings'        => 'box3_post_orderby',
		'label'           => esc_html__( 'Post Order By', 'newshit' ),
		'section'         => 'front_three_box_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_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ]
        ],
	]
);

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

new \Kirki\Field\Number(
	[
		'settings' => 'box3_title_lanth',
		'label'    => esc_html__( 'Title Length', 'newshit' ),
		'section'  => 'front_three_box_section',
		'default'  => 20,
		'choices'  => [
			'min'  => 1,
			'max'  => 50,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ]
        ],
	]
);

new \Kirki\Field\Number(
	[
		'settings' => 'box3_dispaly_item',
		'label'    => esc_html__( 'Dispaly Item', 'newshit' ),
		'section'  => 'front_three_box_section',
		'default'  => 4,
		'choices'  => [
			'min'  => 1,
			'max'  => 6,
			'step' => 1,
		],
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ]
        ],
	]
);
new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'box3_dispaly_item_pro',
		'label'       => esc_html__( 'Purchase Pro for Add Unlimited Items', 'newshit' ),
		'description' => newshit_purchase_link(),
		'section'     => 'front_three_box_section',
		'default'     => '',
		'transport'   => 'auto',
		'active_callback' => [
            [
                'setting'  => 'enable_three_box_section',
                'operator' => '===',
                'value'    => true,
            ],
            [
                'setting'  => 'select_three_boxs',
                'operator' => '===',
                'value'    => 'three',
            ]
        ],
	]
);