<?php
/**
 * coupon-flash-deals Theme Customizer.
 *
 * @package coupon-flash-deals
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function coupon_flash_deals_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
	$wp_customize->get_setting( 'background_color' )->transport = 'postMessage';
	$wp_customize->get_setting('custom_logo')->transport = 'refresh';	
}
add_action( 'customize_register', 'coupon_flash_deals_customize_register' );

if ( class_exists("Kirki")){

    //Post & Pages Setting Panel
	new \Kirki\Panel(
		'coupon_flash_deals_post_pages_section',
		[
			'priority'    => 11,
			'title'       => esc_html__( 'Post & Pages Settings', 'coupon-flash-deals' ),
		]
	);

	/* Banner Options */

	new \Kirki\Section(
		'coupon_flash_deals_banner_options',
		[
			'title'       => esc_html__( 'Banner Image Settings', 'coupon-flash-deals' ),
			'priority'    => 30,
			'panel'		  => 'coupon_flash_deals_post_pages_section',
		]
	);

	new \Kirki\Field\Image(
		[
			'settings'    => 'coupon_flash_deals_custom_fallback_img',
			'label'       => esc_html__( 'Featured Header Image Banner Background', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_banner_options',
			'default'     => '',
		]
	);

	/* Single Post Options */

	new \Kirki\Section(
		'coupon_flash_deals_single_post_options',
		[
			'title'       => esc_html__( 'Single Post Options', 'coupon-flash-deals' ),
			'priority'    => 30,
			'panel'		  => 'coupon_flash_deals_post_pages_section',
		]
	);
    
    /* Single Post Heading Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_single_post_heading_on_off',
			'label'       => esc_html__( 'Single Post Heading On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Single Post Content Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_single_post_content_on_off',
			'label'       => esc_html__( 'Single Post Content On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Single Post Meta Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_single_meta_on_off',
			'label'       => esc_html__( 'Single Post Meta On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Single Post Feature Image Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_single_post_image_on_off',
			'label'       => esc_html__( 'Single Post Feature Image On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Single Post Pagination Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_single_post_pagination_on_off',
			'label'       => esc_html__( 'Single Post Pagination On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Page Options */
		new \Kirki\Section(
		'coupon_flash_deals_single_page_options',
		[
			'title'       => esc_html__( 'Page Sidebar Options', 'coupon-flash-deals' ),
			'priority'    => 30,
			'panel'		  => 'coupon_flash_deals_post_pages_section',
		]
	);

	new \Kirki\Field\Radio(
	[
		'settings'    => 'coupon_flash_deals_single_page_sidebar_option',
		'label'       => esc_html__( 'Page Sidebar Settings', 'coupon-flash-deals' ),
		'section'     => 'coupon_flash_deals_single_page_options',
		'default'     => 'right',
		'priority'    => 10,
		'choices'     => [
			'right'   => esc_html__( 'Page With Right Sidebar', 'coupon-flash-deals' ),
			'left' => esc_html__( 'Page With Left Sidebar', 'coupon-flash-deals' ),
			'none'  => esc_html__( 'Page With No Sidebar', 'coupon-flash-deals' ),

		],
	]
);
	/* Page Options End*/

	/* Post Options */

	new \Kirki\Section(
		'coupon_flash_deals_post_options',
		[
			'title'       => esc_html__( 'Post Options', 'coupon-flash-deals' ),
			'priority'    => 30,
			'panel'		  => 'coupon_flash_deals_post_pages_section',
		]
	);
    
    /* Post Image Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_image_on_off',
			'label'       => esc_html__( 'Post Image On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post Heading Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_heading_on_off',
			'label'       => esc_html__( 'Post Heading On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post Content Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_content_on_off',
			'label'       => esc_html__( 'Post Content On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post Date Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_date_on_off',
			'label'       => esc_html__( 'Post Date On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post Comments Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_comment_on_off',
			'label'       => esc_html__( 'Post Comments On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post Author Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_author_on_off',
			'label'       => esc_html__( 'Post Author On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post Categories Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_post_categories_on_off',
			'label'       => esc_html__( 'Post Categories On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Post limit Option End */
	new \Kirki\Field\Slider(
		[
			'settings'    => 'coupon_flash_deals_post_content_limit',
			'label'       => esc_html__( 'Post Content Limit', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_options',
			'default'     => 15,
			'choices'     => [
				'min'  => 0,
				'max'  => 50,
				'step' => 1,
			],
		]
	);

	/* Post Options End */

	/* Post Options */

	new \Kirki\Section(
		'coupon_flash_deals_post_layouts_section',
		[
			'title'       => esc_html__( 'Post Layout Options', 'coupon-flash-deals' ),
			'priority'    => 30,
			'panel'		  => 'coupon_flash_deals_post_pages_section',
		]
	);

	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'coupon_flash_deals_post_layout',
			'label'       => esc_html__( 'Blog Layout', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_post_layouts_section',
			'default'     => 'two_column_right',
			'priority'    => 10,
			'choices'     => [
				'one_column'   => get_template_directory_uri().'/images/1column.png',
				'two_column_right' => get_template_directory_uri().'/images/right-sidebar.png',
				'two_column_left'  => get_template_directory_uri().'/images/left-sidebar.png',
				'three_column'  => get_template_directory_uri().'/images/3column.png',
				'four_column'  => get_template_directory_uri().'/images/4column.png',
				'grid_post'  => get_template_directory_uri().'/images/grid.png',
			],
		]
	);

	/* Post Options End */

	/* 404 Page */

	new \Kirki\Section(
		'coupon_flash_deals_404_page_section',
		[
			'title'       => esc_html__( '404 Page', 'coupon-flash-deals' ),
			'description' => esc_html__( 'Here you can add 404 Page information.', 'coupon-flash-deals' ),
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'coupon_flash_deals_404_page_heading',
			'label'    => esc_html__( 'Add Heading', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_404_page_section',
			'default'  => esc_html__( '404', 'coupon-flash-deals' ),
			'priority' => 10,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'coupon_flash_deals_404_page_content',
			'label'    => esc_html__( 'Add Content', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_404_page_section',
			'default'  => esc_html__( 'Ops! Something happened...', 'coupon-flash-deals' ),
			'priority' => 10,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'coupon_flash_deals_404_page_button',
			'label'    => esc_html__( 'Add Button', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_404_page_section',
			'default'  => esc_html__( 'Home', 'coupon-flash-deals' ),
			'priority' => 10,
		]
	);

	/* 404 Page End */

	/* General Options */

	new \Kirki\Section(
		'coupon_flash_deals_general_options_section',
		[
			'title'       => esc_html__( 'General Options', 'coupon-flash-deals' ),
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_sticky_header_setting',
			'label'       => esc_html__( 'Show Hide Sticky Header', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_general_options_section',
			'default'     => 'off',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_preloader_setting',
			'label'       => esc_html__( 'Preloader On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_general_options_section',
			'default'     => 'off',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_scroll_to_top_setting',
			'label'       => esc_html__( 'Scroll To Top On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_general_options_section',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* General Options End */

	/* Logo */

	/* Logo Size limit Option End */
	new \Kirki\Field\Slider(
		[
			'settings'    => 'coupon_flash_deals_logo_resizer_setting',
			'label'       => esc_html__( 'Logo Size Limit', 'coupon-flash-deals' ),
			'section'     => 'title_tagline',
			'default'     => 70,
			'choices'     => [
				'min'  => 10,
				'max'  => 300,
				'step' => 10,
			],
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_site_title_setting',
			'label'       => esc_html__( 'Site Title On / Off', 'coupon-flash-deals' ),
			'section'     => 'title_tagline',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_tagline_setting',
			'label'       => esc_html__( 'Tagline On / Off', 'coupon-flash-deals' ),
			'section'     => 'title_tagline',
			'default'     => 'off',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	/* Logo End */

	/* Typography Section */

	new \Kirki\Section(
		'coupon_flash_deals_theme_typography_section',
		[
			'title'       => esc_html__( 'Theme Typography', 'coupon-flash-deals' ),
			'description' => esc_html__( 'Here you can customize Heading or other body text font settings', 'coupon-flash-deals' ),
			'priority'    => 30,
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'custom',
		'settings'    => 'coupon_flash_deals_all_headings_typography',
		'section'     => 'coupon_flash_deals_theme_typography_section',
			'default'         => '<h3 style="color: #2271b1; padding:10px; background:#fff; margin:0; border-left: solid 5px #2271b1; ">' . __( 'Heading Of All Sections',  'coupon-flash-deals' ) . '</h3>',
		'priority'    => 10,
	] );

	Kirki::add_field( 'global', array(
		'type'        => 'typography',
		'settings'    => 'coupon_flash_deals_all_headings_typography',
		'label'       => esc_html__( 'Heading Typography',  'coupon-flash-deals' ),
		'description' => esc_html__( 'Select the typography options for your heading.',  'coupon-flash-deals' ),
		'section'     => 'coupon_flash_deals_theme_typography_section',
		'priority'    => 10,
		'default'     => array(
			'font-family'    => '',
			'variant'        => '',
		),
		'output' => array(
			array(
				'element' => array( 'h1','h2','h3','h4','h5','h6', ),
			),
		),
	) );

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'custom',
		'settings'    => 'coupon_flash_deals_body_content_typography',
		'section'     => 'coupon_flash_deals_theme_typography_section',
			'default'         => '<h3 style="color: #2271b1; padding:10px; background:#fff; margin:0; border-left: solid 5px #2271b1; ">' . __( 'Body Content',  'coupon-flash-deals' ) . '</h3>',
		'priority'    => 10,
	] );

	Kirki::add_field( 'global', array(
		'type'        => 'typography',
		'settings'    => 'coupon_flash_deals_body_content_typography',
		'label'       => esc_html__( 'Content Typography',  'coupon-flash-deals' ),
		'description' => esc_html__( 'Select the typography options for your content.',  'coupon-flash-deals' ),
		'section'     => 'coupon_flash_deals_theme_typography_section',
		'priority'    => 10,
		'default'     => array(
			'font-family'    => '',
			'variant'        => '',
		),
		'output' => array(
			array(
				'element' => array( 'body', ),
			),
		),
	) );

    /* End Typography */

        /* Woocommerce Section */

	new \Kirki\Section(
		'coupon_flash_deals_theme_product_sidebar',
		[
			'title'       => esc_html__( 'Woocommerce Sidebars', 'coupon-flash-deals' ),
			'description' => esc_html__( 'Here you can change woocommerce sidebar', 'coupon-flash-deals' ),
			'panel' =>'woocommerce',
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Select(
		[
			'settings'    => 'coupon_flash_deals_product_sidebar_position',
			'label'       => esc_html__( 'Sidebar Option', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_theme_product_sidebar',
			'default'     => 'right',
			'choices'     => [
				'left' => esc_html__( 'Left Sidebar', 'coupon-flash-deals' ),
				'right' => esc_html__( 'Right Sidebar', 'coupon-flash-deals' ),
				'none' => esc_html__( 'No Sidebar', 'coupon-flash-deals' ),
			],
		]
	);

    /* Woocommerce Section End */

    /* Global Color Section */

	new \Kirki\Section(
		'coupon_flash_deals_theme_color_section',
		[
			'title'       => esc_html__( 'Theme Colors Option', 'coupon-flash-deals' ),
			'description' => esc_html__( 'Here you can change your theme color', 'coupon-flash-deals' ),
			'priority'    => 30,
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'color',
		'settings'    => 'coupon_flash_deals_theme_color_1',
		'label'       => __( 'Select Your First Color', 'coupon-flash-deals' ),
		'section'     => 'coupon_flash_deals_theme_color_section',
		'default'     => '#f57f25',
	] );


       /* Global Color End */

    /* Breadcrumb Section */

	new \Kirki\Section(
		'coupon_flash_deals_breadcrumb_section',
		[
			'title'       => esc_html__( 'Theme Breadcrumb Option', 'coupon-flash-deals' ),
			'description' => esc_html__( 'The breadcrumbs for your theme can be included here.', 'coupon-flash-deals' ),
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_breadcrumb_setting',
			'label'       => esc_html__( 'Enable Breadcrumbs Option', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_breadcrumb_section',
			'default'     => true,
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);


    /* Breadcrumb section End */

	// PANEL
	Kirki::add_panel( 'coupon_flash_deals_panel_id_5', array(
	    'priority'    => 10,
	    'title'       => esc_html__( 'Theme Animations', 'coupon-flash-deals' ),
	) );

	// ANIMATION SECTION
	Kirki::add_section( 'coupon_flash_deals_section_animation', array(
	    'title'          => esc_html__( 'Animations', 'coupon-flash-deals' ),
	    'priority'       => 2,
	) );

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'switch',
		'settings'    => 'coupon_flash_deals_animation_enabled',
		'label'       => esc_html__( 'Turn To Show Animation', 'coupon-flash-deals' ),
		'section'     => 'coupon_flash_deals_section_animation',
		'default'     => true,
		'priority'    => 10,
		'choices'     => [
			'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
			'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
		],
	] );

	//Home page Setting Panel
	new \Kirki\Panel(
		'coupon_flash_deals_home_page_section',
		[
			'priority'    => 10,
			'title'       => esc_html__( 'Home Page Sections', 'coupon-flash-deals' ),
		]
	);

	/* Header */

	new \Kirki\Section(
		'coupon_flash_deals_header_button_section',
		[
			'title'       => esc_html__( 'Header', 'coupon-flash-deals' ),
			'description' => esc_html__( 'Here you can add header contact information.', 'coupon-flash-deals' ),
			'panel'		  => 'coupon_flash_deals_home_page_section',
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'coupon_flash_deals_header_email_address',
			'label'    => esc_html__( 'Add Email Address', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_header_button_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'coupon_flash_deals_header_phone_number',
			'label'    => esc_html__( 'Add Phone Number', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_header_button_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'coupon_flash_deals_header_location',
			'label'    => esc_html__( 'Add Location', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_header_button_section',
			'default'  => '',
			'priority' => 10,
		]
	);
	
	/* Home Slider */

	new \Kirki\Section(
		'coupon_flash_deals_home_slider_section',
		[
			'title'       => esc_html__( 'Home Slider', 'coupon-flash-deals' ),
			'description' => esc_html__( 'Here you can add slider image, title and text.', 'coupon-flash-deals' ),
			'panel'		  => 'coupon_flash_deals_home_page_section',
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'coupon_flash_deals_slide_on_off',
			'label'       => esc_html__( 'Slider On / Off', 'coupon-flash-deals' ),
			'section'     => 'coupon_flash_deals_home_slider_section',
			'default'     => 'off',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'coupon-flash-deals' ),
				'off' => esc_html__( 'Disable', 'coupon-flash-deals' ),
			],
		]
	);

	new \Kirki\Field\Number(
		[
			'settings' => 'coupon_flash_deals_slide_count',
			'label'    => esc_html__( 'Slider Number Control', 'coupon-flash-deals' ),
			'section'  => 'coupon_flash_deals_home_slider_section',
			'default'  => '',
			'choices'  => [
				'min'  => 1,
				'max'  => 2	,
				'step' => 1,
			],
		]
	);

	$coupon_flash_deals_slide_count = get_theme_mod('coupon_flash_deals_slide_count');

	for ($i=1; $i <= $coupon_flash_deals_slide_count; $i++) { 
		
		new \Kirki\Field\Image(
			[
				'settings'    => 'coupon_flash_deals_slider_image'.$i,
				'label'       => esc_html__( 'Slider Image 0', 'coupon-flash-deals' ).$i,
				'section'     => 'coupon_flash_deals_home_slider_section',
				'default'     => '',
			]
		);

		new \Kirki\Field\Text(
			[
				'settings' => 'coupon_flash_deals_slider_sub_heading'.$i,
				'label'    => esc_html__( 'Sub Heading 0', 'coupon-flash-deals' ).$i,
				'section'  => 'coupon_flash_deals_home_slider_section',
			]
		);

		new \Kirki\Field\Text(
			[
				'settings' => 'coupon_flash_deals_slider_heading'.$i,
				'label'    => esc_html__( 'Main Heading 0', 'coupon-flash-deals' ).$i,
				'section'  => 'coupon_flash_deals_home_slider_section',
			]
		);

		new \Kirki\Field\Text(
			[
				'settings' => 'coupon_flash_deals_slider_content'.$i,
				'label'    => esc_html__( 'Slider Text 0', 'coupon-flash-deals' ).$i,
				'section'  => 'coupon_flash_deals_home_slider_section',
			]
		);
	}

}