<?php
/**
 * Createing an recent Product pannel for customizer
 *
 */

// START RECENT PRODUCT SECTION 
    $wp_customize->add_section(
        'recentproduct_section',
        array(
            'title' => __( 'Recent Products Section', 'supermarket-ecommerce' ),
            'panel' => 'lz_fitness_premium_home_panel'
        )
    );
    // ENABLE/DISABLE Recent Products SECTION
    $wp_customize->add_setting(
        'recentproductout_section_disable',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Switch_Control(
            $wp_customize,
            'recentproductout_section_disable',
            array(
                'settings'      => 'recentproductout_section_disable',
                'section'       => 'recentproduct_section',
                'label'         => __( 'Disable Section', 'supermarket-ecommerce' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'supermarket-ecommerce' ),
                    'off' => __( 'No', 'supermarket-ecommerce' )
                ),
            )
        )
    );

backgroundManager($wp_customize, 'recentproductout', 'recentproduct_section', $color='#f7f5f6', get_template_directory_uri().'/images/default-gray.png', 'img');


lzCustomLable($wp_customize, 'lz_fitness_recentproduct_label', 'recentproduct_section', ' Recent Product Section :');


lzCustomLable($wp_customize, 'recentproductoutsection_padding', 'recentproduct_section', ' Section Padding Setting:');

$wp_customize->add_setting(
    'recentproductout_toppadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'recentproductout_toppadding',
    array(
        'settings'      => 'recentproductout_toppadding',
        'section'       => 'recentproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'recentproductout_bottompadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'recentproductout_bottompadding',
    array(
        'settings'      => 'recentproductout_bottompadding',
        'section'       => 'recentproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'recentproductout_leftpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'recentproductout_leftpadding',
    array(
        'settings'      => 'recentproductout_leftpadding',
        'section'       => 'recentproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Left Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'recentproductout_rightpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'recentproductout_rightpadding',
    array(
        'settings'      => 'recentproductout_rightpadding',
        'section'       => 'recentproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Right Padding', 'luzuk-premium' )
    )
);


backgroundManager($wp_customize, 'recentproductin', 'recentproduct_section', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');



    $wp_customize->add_setting(
    'lz_fitness_recent_product_title_sub_title_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text'
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_recent_product_title_sub_title_heading',
        array(
            'settings'      => 'lz_fitness_recent_product_title_sub_title_heading',
            'section'       => 'recentproduct_section',
            'label'         => __( 'Section Title', 'Luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting(
    'lz_fitness_recent_product_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Recent Products', 'Luzuk-premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_recent_product_title',
    array(
        'settings'      => 'lz_fitness_recent_product_title',
        'section'       => 'recentproduct_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'Luzuk-premium' )
    )
);
// Heading color
addColorPalatOption($wp_customize, 'recentprod_Heading_color', 'recentproduct_section', 'Heading color ', '#343748');


// Product title color
addColorPalatOption($wp_customize, 'recentprod_title_color', 'recentproduct_section', 'Product title color ', '#353535');


// Product Reguler price color
addColorPalatOption($wp_customize, 'recentprod_proregulerprice_color', 'recentproduct_section', 'Product reguler price color ', '#353535');


// Product sale price color
addColorPalatOption($wp_customize, 'recentprod_prosaleingprice_color', 'recentproduct_section', 'Product sale price color ', '#605da6');


// Product box bg  color
addColorPalatOption($wp_customize, 'recentprod_proboxbg_color', 'recentproduct_section', 'Product box background color ', '#f7f5f6');