<?php
/**
 * party-rental Theme Customizer.
 *
 * @package party-rental
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function party_rental_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', 'party_rental_customize_register' );

if ( ! defined( 'PARTY_RENTAL_SHOP_BUY_NOW_1' ) ) {
define('PARTY_RENTAL_SHOP_BUY_NOW_1',__('https://www.mishkatwp.com/themes/party-wordpress-theme/','party-rental'));
}

if ( ! defined( 'PARTY_RENTAL_SHOP_BUNDLE_1' ) ) {
define('PARTY_RENTAL_SHOP_BUNDLE_1',__('https://www.mishkatwp.com/themes/WordPress-theme-bundle/','party-rental'));
}


if ( class_exists("Kirki")){

    //Post & Pages Setting Panel
	new \Kirki\Panel(
		'party_rental_post_pages_section',
		[
			'priority'    => 11,
			'title'       => esc_html__( 'Post & Pages Settings', 'party-rental' ),
		]
	);

	/* Banner Options */

	new \Kirki\Section(
		'party_rental_banner_options',
		[
			'title'       => esc_html__( 'Banner Image Settings', 'party-rental' ),
			'priority'    => 30,
			'panel'		  => 'party_rental_post_pages_section',
		]
	);

	new \Kirki\Field\Image(
		[
			'settings'    => 'party_rental_custom_fallback_img',
			'label'       => esc_html__( 'Featured Header Image Banner Background', 'party-rental' ),
			'section'     => 'party_rental_banner_options',
			'default'     => '',
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_banner_options',
    ] );

	/* Single Post Options */

	new \Kirki\Section(
		'party_rental_single_post_options',
		[
			'title'       => esc_html__( 'Single Post Options', 'party-rental' ),
			'priority'    => 30,
			'panel'		  => 'party_rental_post_pages_section',
		]
	);

	/* Single Post Content Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_single_post_content_on_off',
			'label'       => esc_html__( 'Single Post Content On / Off', 'party-rental' ),
			'section'     => 'party_rental_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Single Post Meta Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_single_meta_on_off',
			'label'       => esc_html__( 'Single Post Meta On / Off', 'party-rental' ),
			'section'     => 'party_rental_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Single Post Feature Image Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_single_post_image_on_off',
			'label'       => esc_html__( 'Single Post Feature Image On / Off', 'party-rental' ),
			'section'     => 'party_rental_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Single Post Pagination Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_single_post_pagination_on_off',
			'label'       => esc_html__( 'Single Post Pagination On / Off', 'party-rental' ),
			'section'     => 'party_rental_single_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_single_post_options',
    ] );

	/* Page Options */
		new \Kirki\Section(
		'party_rental_single_page_options',
		[
			'title'       => esc_html__( 'Page Sidebar Options', 'party-rental' ),
			'priority'    => 30,
			'panel'		  => 'party_rental_post_pages_section',
		]
	);

	new \Kirki\Field\Radio(
	[
		'settings'    => 'party_rental_single_page_sidebar_option',
		'label'       => esc_html__( 'Page Sidebar Settings', 'party-rental' ),
		'section'     => 'party_rental_single_page_options',
		'default'     => 'right',
		'priority'    => 10,
		'choices'     => [
			'right'   => esc_html__( 'Page With Right Sidebar', 'party-rental' ),
			'left' => esc_html__( 'Page With Left Sidebar', 'party-rental' ),
			'none'  => esc_html__( 'Page With No Sidebar', 'party-rental' ),

		],
	]
);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_single_page_options',
    ] );
	/* Page Options End*/

	/* Post Options */

	new \Kirki\Section(
		'party_rental_post_options',
		[
			'title'       => esc_html__( 'Post Options', 'party-rental' ),
			'priority'    => 30,
			'panel'		  => 'party_rental_post_pages_section',
		]
	);
    
    /* Post Image Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_image_on_off',
			'label'       => esc_html__( 'Post Image On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Post Heading Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_heading_on_off',
			'label'       => esc_html__( 'Post Heading On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Post Content Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_content_on_off',
			'label'       => esc_html__( 'Post Content On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Post Date Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_date_on_off',
			'label'       => esc_html__( 'Post Date On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Post Comments Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_comment_on_off',
			'label'       => esc_html__( 'Post Comments On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Post Author Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_author_on_off',
			'label'       => esc_html__( 'Post Author On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	/* Post Categories Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_post_categories_on_off',
			'label'       => esc_html__( 'Post Categories On / Off', 'party-rental' ),
			'section'     => 'party_rental_post_options',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

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

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_post_options',
    ] );
	/* Post Options End */

	/* Post Options */

	new \Kirki\Section(
		'party_rental_post_layouts_section',
		[
			'title'       => esc_html__( 'Post Layout Options', 'party-rental' ),
			'priority'    => 30,
			'panel'		  => 'party_rental_post_pages_section',
		]
	);

	new \Kirki\Field\Radio_Image(
		[
			'settings'    => 'party_rental_post_layout',
			'label'       => esc_html__( 'Blog Layout', 'party-rental' ),
			'section'     => 'party_rental_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',
			],
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_post_layouts_section',
    ] );

	/* Post Options End */

	/* Related Post Options */

	new \Kirki\Section(
		'party_rental_related_post_section',
		[
			'title'       => esc_html__( 'Related Post Options', 'party-rental' ),
			'priority'    => 30,
			'panel'		  => 'party_rental_post_pages_section',
		]
	);

    /* Post Image Option End */
	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_enable_related_post_thumbnail',
			'label'       => esc_html__( 'Related Post Image On / Off', 'party-rental' ),
			'section'     => 'party_rental_related_post_section',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_related_post_section',
    ] );

	/* Related Post Options End */


	/* 404 Page */

	new \Kirki\Section(
		'party_rental_404_page_section',
		[
			'title'       => esc_html__( '404 Page', 'party-rental' ),
			'description' => esc_html__( 'Here you can add 404 Page information.', 'party-rental' ),
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_404_page_heading',
			'label'    => esc_html__( 'Add Heading', 'party-rental' ),
			'section'  => 'party_rental_404_page_section',
			'default'  => esc_html__( '404', 'party-rental' ),
			'priority' => 10,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_404_page_content',
			'label'    => esc_html__( 'Add Content', 'party-rental' ),
			'section'  => 'party_rental_404_page_section',
			'default'  => esc_html__( 'Ops! Something happened...', 'party-rental' ),
			'priority' => 10,
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_404_page_button',
			'label'    => esc_html__( 'Add Button', 'party-rental' ),
			'section'  => 'party_rental_404_page_section',
			'default'  => esc_html__( 'Home', 'party-rental' ),
			'priority' => 10,
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_404_page_section',
    ] );

	/* 404 Page End */

	/* General Options */

	new \Kirki\Section(
		'party_rental_general_options_section',
		[
			'title'       => esc_html__( 'General Options', 'party-rental' ),
			'priority'    => 30,
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_sticky_header_setting',
			'label'       => esc_html__( 'Show Hide Sticky Header', 'party-rental' ),
			'section'     => 'party_rental_general_options_section',
			'default'     => 'off',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_preloader_setting',
			'label'       => esc_html__( 'Preloader On / Off', 'party-rental' ),
			'section'     => 'party_rental_general_options_section',
			'default'     => 'off',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	new \Kirki\Field\Select(
	[
		'settings'    => 'party_rental_preloader_type',
		'label'       => esc_html__( 'Preloader Type', 'party-rental' ),
		'section'     => 'party_rental_general_options_section',
		'default'     => 'load',
		'placeholder' => esc_html__( 'Choose an option', 'party-rental' ),
		'choices'     => [
			'load' => esc_html__( 'Load', 'party-rental' ),
			'time' => esc_html__( 'Time', 'party-rental' ),
		],
	] );

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_scroll_to_top_setting',
			'label'       => esc_html__( 'Scroll To Top On / Off', 'party-rental' ),
			'section'     => 'party_rental_general_options_section',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_general_options_section',
    ] );

	/* General Options End */

	/* Logo */

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

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

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

	/* Logo End */

	/* Typography Section */

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

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

	Kirki::add_field( 'global', array(
		'type'        => 'typography',
		'settings'    => 'party_rental_all_headings_typography',
		'label'       => esc_html__( 'Heading Typography',  'party-rental' ),
		'description' => esc_html__( 'Select the typography options for your heading.',  'party-rental' ),
		'section'     => 'party_rental_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'    => 'party_rental_body_content_typography',
		'section'     => 'party_rental_theme_typography_section',
			'default'         => '<h3 style="color: #2271b1; padding:10px; background:#fff; margin:0; border-left: solid 5px #2271b1; ">' . __( 'Body Content',  'party-rental' ) . '</h3>',
		'priority'    => 10,
	] );

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

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_theme_typography_section',
    ] );

    /* End Typography */

        /* Woocommerce Section */

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

	new \Kirki\Field\Select(
		[
			'settings'    => 'party_rental_product_sidebar_position',
			'label'       => esc_html__( 'Sidebar Option', 'party-rental' ),
			'section'     => 'party_rental_theme_product_sidebar',
			'default'     => 'right',
			'choices'     => [
				'left' => esc_html__( 'Left Sidebar', 'party-rental' ),
				'right' => esc_html__( 'Right Sidebar', 'party-rental' ),
				'none' => esc_html__( 'No Sidebar', 'party-rental' ),
			],
		]
	);


	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_theme_product_sidebar',
    ] );

    /* Woocommerce Section End */

    /* Global Color Section */

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

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'color',
		'settings'    => 'party_rental_theme_color_1',
		'label'       => __( 'Select Your First Color', 'party-rental' ),
		'section'     => 'party_rental_theme_color_section',
		'default'     => '#35523F',
	] );

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'color',
		'settings'    => 'party_rental_theme_color_2',
		'label'       => __( 'Select Your Second Color', 'party-rental' ),
		'section'     => 'party_rental_theme_color_section',
		'default'     => '#B4963E',
	] );

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'color',
		'settings'    => 'party_rental_theme_color_3',
		'label'       => __( 'Select Your Third Color', 'party-rental' ),
		'section'     => 'party_rental_theme_color_section',
		'default'     => '#F5C9D0',
	] );

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_theme_color_section',
    ] );


       /* Global Color End */

    /* Breadcrumb Section */

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

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_breadcrumb_setting',
			'label'       => esc_html__( 'Enable Breadcrumbs Option', 'party-rental' ),
			'section'     => 'party_rental_breadcrumb_section',
			'default'     => true,
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_breadcrumb_section',
    ] );


    /* Breadcrumb section End */

	// PANEL
	Kirki::add_panel( 'party_rental_panel_id_5', array(
	    'priority'    => 10,
	    'title'       => esc_html__( 'Theme Animations', 'party-rental' ),
	) );

	// ANIMATION SECTION
	Kirki::add_section( 'party_rental_section_animation', array(
	    'title'          => esc_html__( 'Animations', 'party-rental' ),
	    'priority'       => 2,
	) );

	Kirki::add_field( 'theme_config_id', [
		'type'        => 'switch',
		'settings'    => 'party_rental_animation_enabled',
		'label'       => esc_html__( 'Turn To Show Animation', 'party-rental' ),
		'section'     => 'party_rental_section_animation',
		'default'     => true,
		'priority'    => 10,
		'choices'     => [
			'on'  => esc_html__( 'Enable', 'party-rental' ),
			'off' => esc_html__( 'Disable', 'party-rental' ),
		],
	] );

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'priority'    => 100,
        'section'     => 'party_rental_section_animation',
    ] );
    

	//Home page Setting Panel
	new \Kirki\Panel(
		'party_rental_home_page_section',
		[
			'priority'    => 10,
			'title'       => esc_html__( 'Home Page Sections', 'party-rental' ),
		]
	);

	/* Social Icon */

	new \Kirki\Section(
		'party_rental_top_header_section',
		[
			'title'       => esc_html__( 'Slider Social Icon', 'party-rental' ),
			'description' => esc_html__( 'Here you can add social links.', 'party-rental' ),
			'panel'		  => 'party_rental_home_page_section',
			'priority'    => 40,
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_top_twitter_link',
			'label'    => esc_html__( 'Add Twitter Link', 'party-rental' ),
			'section'  => 'party_rental_top_header_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_top_linkdin_link',
			'label'    => esc_html__( 'Add Linkdin Link', 'party-rental' ),
			'section'  => 'party_rental_top_header_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_top_youtube_link',
			'label'    => esc_html__( 'Add Youtube Link', 'party-rental' ),
			'section'  => 'party_rental_top_header_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_top_facebook_link',
			'label'    => esc_html__( 'Add Facebook Link', 'party-rental' ),
			'section'  => 'party_rental_top_header_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_top_instagram_link',
			'label'    => esc_html__( 'Add Instagram Link', 'party-rental' ),
			'section'  => 'party_rental_top_header_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_top_header_section',
    ] );

	/* Header */

	new \Kirki\Section(
		'party_rental_header_button_section',
		[
			'title'       => esc_html__( 'Header', 'party-rental' ),
			'description' => esc_html__( 'Here you can add header Wishlist link.', 'party-rental' ),
			'panel'		  => 'party_rental_home_page_section',
			'priority'    => 30,
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_header_wishlist_link',
			'label'    => esc_html__( 'Add Wishlist Url', 'party-rental' ),
			'section'  => 'party_rental_header_button_section',
			'default'  => '',
			'priority' => 10,
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_header_button_section',
    ] );

	/* Home Slider */

	new \Kirki\Section(
		'party_rental_home_slider_section',
		[
			'title'       => esc_html__( 'Home Slider', 'party-rental' ),
			'description' => esc_html__( 'Here you can add slider image, title and text.', 'party-rental' ),
			'panel'		  => 'party_rental_home_page_section',
			'priority'    => 50,
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_slide_on_off',
			'label'       => esc_html__( 'Slider On / Off', 'party-rental' ),
			'section'     => 'party_rental_home_slider_section',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_short_heading',
			'label'    => esc_html__( 'Banner Short Heading ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_main_heading' ,
			'label'    => esc_html__( 'Banner Main Heading ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_price',
			'label'    => esc_html__( 'Banner Price ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_button_text',
			'label'    => esc_html__( 'Slider Button Text ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\URL(
		[
			'settings' => 'party_rental_slider_button_link',
			'label'    => esc_html__( 'Slider Button Url ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
			'default'  => '',
		]
	);

	new \Kirki\Field\Image(
		[
			'settings'    => 'party_rental_slider_image_1',
			'label'       => esc_html__( 'Slider Image ', 'party-rental' ),
			'section'     => 'party_rental_home_slider_section',
			'default'     => '',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_offer_price',
			'label'    => esc_html__( 'Offer Price ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_offer_price_text',
			'label'    => esc_html__( 'Offer Price Text ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_phone_number',
			'label'    => esc_html__( 'Phone Number ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_slider_contact_email',
			'label'    => esc_html__( 'Email Id ', 'party-rental' ),
			'section'  => 'party_rental_home_slider_section',
		]
	);

	new \Kirki\Field\Text(
        [
            'settings' => 'party_rental_slider_testimonial_heading',
            'label'    => esc_html__( 'Slider Testimonial Heading ', 'party-rental' ) ,
            'section'  => 'party_rental_home_slider_section',
        ]
    );

    new \Kirki\Field\Text(
        [
            'settings' => 'party_rental_slider_testimonial_content',
            'label'    => esc_html__( 'Slider Testimonial Text ', 'party-rental' ) ,
            'section'  => 'party_rental_home_slider_section',
            'default'  => '',
        ]
    );

	new \Kirki\Field\Image(
		[
			'settings'    => 'party_rental_slider_testimonial_image_1',
			'label'       => esc_html__( 'Slider Testimonial Image 1', 'party-rental' ),
			'section'     => 'party_rental_home_slider_section',
			'default'     => '',
		]
	);

	new \Kirki\Field\Image(
		[
			'settings'    => 'party_rental_slider_testimonial_image_2',
			'label'       => esc_html__( 'Slider Testimonial Image 2', 'party-rental' ),
			'section'     => 'party_rental_home_slider_section',
			'default'     => '',
		]
	);

	new \Kirki\Field\Image(
		[
			'settings'    => 'party_rental_slider_testimonial_image_3',
			'label'       => esc_html__( 'Slider Testimonial Image 3', 'party-rental' ),
			'section'     => 'party_rental_home_slider_section',
			'default'     => '',
		]
	);

	new \Kirki\Field\Image(
		[
			'settings'    => 'party_rental_slider_testimonial_image_4',
			'label'       => esc_html__( 'Slider Testimonial Image 4', 'party-rental' ),
			'section'     => 'party_rental_home_slider_section',
			'default'     => '',
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_home_slider_section',
    ] );


	/* Home our Cause */

	new \Kirki\Section(
	    'party_rental_home_industry_heroes_section',
	    [
	        'title'       => esc_html__( 'Featured Product', 'party-rental' ),
	        'description' => esc_html__( 'Here you can add Featured Product related text to display Featured Product.', 'party-rental' ),
	        'panel'       => 'party_rental_home_page_section',
	        'priority'    => 60,
	    ]
	);

	new \Kirki\Field\Checkbox_Switch(
	    [
	        'settings'    => 'party_rental_why_join_us_on_off',
	        'label'       => esc_html__( 'Featured Product On / Off', 'party-rental' ),
	        'section'     => 'party_rental_home_industry_heroes_section',
	        'default'     => 'on',
	        'choices'     => [
	            'on'  => esc_html__( 'Enable', 'party-rental' ),
	            'off' => esc_html__( 'Disable', 'party-rental' ),
	        ],
	    ]
	);

	new \Kirki\Field\Text(
	    [
	        'settings' => 'party_rental_why_join_us_short_heading',
	        'label'    => esc_html__( 'Short Heading', 'party-rental' ),
	        'section'  => 'party_rental_home_industry_heroes_section',
	    ]
	);

	new \Kirki\Field\Text(
        [
            'settings' => 'party_rental_industry_why_join_us_heading',
            'label'    => esc_html__( 'Main Heading', 'party-rental' ) ,
            'section'  => 'party_rental_home_industry_heroes_section',
        ]
    );

	new \Kirki\Field\Number(
		[
			'settings' => 'party_rental_courses_count',
			'label'    => esc_html__( 'Product Number Control', 'party-rental' ),
			'section'  => 'party_rental_home_industry_heroes_section',
			'default'  => '',
			'choices'  => [
				'min'  => 1,
				'max'  => 12,
				'step' => 1,
			],
		]
	);

	$party_rental_courses_count = get_theme_mod('party_rental_courses_count');

	for ($i=1; $i <= $party_rental_courses_count; $i++) { 
		
		new \Kirki\Field\Image(
			[
				'settings'    => 'party_rental_show_image'.$i,
				'label'       => esc_html__( 'Product Image 0', 'party-rental' ).$i,
				'section'     => 'party_rental_home_industry_heroes_section',
				'default'     => '',
			]
		);

		new \Kirki\Field\Text(
			[
				'settings' => 'party_rental_couses_heading'.$i,
				'label'    => esc_html__( 'Product Name ', 'party-rental' ).$i,
				'section'  => 'party_rental_home_industry_heroes_section',
			]
		);

		new \Kirki\Field\URL(
			[
				'settings' => 'party_rental_couses_heading_url'.$i,
				'label'    => esc_html__( 'Product Name Link ', 'party-rental' ).$i,
				'section'  => 'party_rental_home_industry_heroes_section',
			]
		);
	}

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_home_industry_heroes_section',
    ] );


	/* Footer */

	new \Kirki\Section(
		'party_rental_footer_section',
		[
			'title'       => esc_html__( 'Footer', 'party-rental' ),
			'panel'		  => 'party_rental_home_page_section',
			'priority'    => 70,
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_footer_widgets_on_off',
			'label'       => esc_html__( 'Footer Widgets On / Off', 'party-rental' ),
			'section'     => 'party_rental_footer_section',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	new \Kirki\Field\Checkbox_Switch(
		[
			'settings'    => 'party_rental_copyright_on_off',
			'label'       => esc_html__( 'Footer Copyright On / Off', 'party-rental' ),
			'section'     => 'party_rental_footer_section',
			'default'     => 'on',
			'choices'     => [
				'on'  => esc_html__( 'Enable', 'party-rental' ),
				'off' => esc_html__( 'Disable', 'party-rental' ),
			],
		]
	);

	new \Kirki\Field\Text(
		[
			'settings' => 'party_rental_copyright_content_text',
			'label'    => esc_html__( 'Copyright Text', 'party-rental' ),
			'section'  => 'party_rental_footer_section',
		]
	);

	Kirki::add_field( 'theme_config_id', [
		'label'    => esc_html__( 'Buy Our Premium Theme For More Feature', 'party-rental' ),
		'default'  => 
	        '<a class="premium_info_btn" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUY_NOW_1 ) . '">' . __( 'Buy Pro', 'party-rental' ) . '</a>' .
	        '<a class="premium_info_btn bundle" target="_blank" href="' . esc_url( PARTY_RENTAL_SHOP_BUNDLE_1 ) . '">' . __( 'Buy All Themes In Single Package', 'party-rental' ) . '</a>',
        'type'        => 'custom',
        'section'     => 'party_rental_footer_section',
    ] );
}

function party_rental_customizer_settings( $wp_customize ) {

	$party_rental_args = array(
       'type'                     => 'product',
        'child_of'                 => 0,
        'parent'                   => '',
        'orderby'                  => 'term_group',
        'order'                    => 'ASC',
        'hide_empty'               => false,
        'hierarchical'             => 1,
        'number'                   => '',
        'taxonomy'                 => 'product_cat',
        'pad_counts'               => false
    );

	$categories = get_categories($party_rental_args);
	$cat_posts = array();
	$m = 0;
	$cat_posts[]='Select';
	foreach($categories as $category){
		if($m==0){
			$default = $category->slug;
			$m++;
		}
		$cat_posts[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('party_rental_slider_product_category',array(
		'default'	=> 'select',
		'sanitize_callback' => 'party_rental_sanitize_select',
	));

	$wp_customize->add_control('party_rental_slider_product_category',array(
		'type'    => 'select',
		'choices' => $cat_posts,
		'label' => __('Select category to display products ','party-rental'),
		'section' => 'party_rental_home_slider_section',
	));

}

add_action( 'customize_register', 'party_rental_customizer_settings' );