<?php 
// FProduct Categories SECTION START HERE 
/*============pRODICT CATEGORIES PANEL============*/
$wp_customize->add_section(
    'fcatproproduct_section',
    array(
        'title'         => __( 'Product Section 2', 'supermarket-ecommerce' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
    'fcatproduct_section_disable',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'fcatproduct_section_disable',
        array(
            'settings'      => 'fcatproduct_section_disable',
            'section'       => 'fcatproproduct_section',
            'label'         => __( 'Disable Section', 'supermarket-ecommerce' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'supermarket-ecommerce' ),
                'off' => __( 'No', 'supermarket-ecommerce' )
            )   
        )
    )
);

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

lzCustomLable($wp_customize, 'fcatproductsection_padding', 'fcatproproduct_section', ' Section Padding Setting:');

$wp_customize->add_setting(
    'fcatproduct_toppadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'fcatproduct_toppadding',
    array(
        'settings'      => 'fcatproduct_toppadding',
        'section'       => 'fcatproproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'fcatproduct_bottompadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'fcatproduct_bottompadding',
    array(
        'settings'      => 'fcatproduct_bottompadding',
        'section'       => 'fcatproproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'fcatproduct_leftpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'fcatproduct_leftpadding',
    array(
        'settings'      => 'fcatproduct_leftpadding',
        'section'       => 'fcatproproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Left Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'fcatproduct_rightpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'fcatproduct_rightpadding',
    array(
        'settings'      => 'fcatproduct_rightpadding',
        'section'       => 'fcatproproduct_section',
        'type'          => 'text',
        'label'         => __( 'Section Right Padding', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'lz_fitness_fcatproduct_title_sub_title_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text'
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_fcatproduct_title_sub_title_heading',
        array(
            'settings'      => 'lz_fitness_fcatproduct_title_sub_title_heading',
            'section'       => 'fcatproproduct_section',
            'label'         => __( 'Section Title', 'supermarket-ecommerce' ),
        )
    )
);   
$wp_customize->add_setting(
    'lz_fitness_fcatproduct_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Fashion', 'supermarket-ecommerce' )
    )
);
$wp_customize->add_control(
    'lz_fitness_fcatproduct_title',
    array(
        'settings'      => 'lz_fitness_fcatproduct_title',
        'section'       => 'fcatproproduct_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'supermarket-ecommerce' )
    )
);


// Heading color
addColorPalatOption($wp_customize, 'Fproduct_category_Heading_color', 'fcatproproduct_section', 'Heading color ', '#343748');

lzCustomLable($wp_customize, 'fproductbox_height', 'fcatproproduct_section', ' Product Height Setting:');

$wp_customize->add_setting(
    'fproduct_height',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '318px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'fproduct_height',
    array(
        'settings'      => 'fproduct_height',
        'section'       => 'fcatproproduct_section',
        'type'          => 'text',
        'label'         => __( 'Product Height', 'luzuk-premium' )
    )
);


$choices = getWooCategories($isObject = false, $id=0, $isParents = 0);

// print_r($choices);

lzCheckBoxElement($wp_customize, 'lz_fitness_fcatproduct_categories', 'fcatproproduct_section', $choices, $default=0, $label=__('Please select the Categories to show', 'supermarket-ecommerce'));


// Product title color
addColorPalatOption($wp_customize, 'Fproduct_category_title_color', 'fcatproproduct_section', 'Product title color ', '#353535');

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

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

// Product bg color
addColorPalatOption($wp_customize, 'Fproduct_category_probg_color', 'fcatproproduct_section', 'Product background color ', '#fff');

// Product border color
addColorPalatOption($wp_customize, 'Fproduct_category_proborder_color', 'fcatproproduct_section', 'Product border color ', '#e0e0e0');

// Product box background color
addColorPalatOption($wp_customize, 'Fproduct_category_proboxbg_color', 'fcatproproduct_section', ' Product box background color ', '#fff');


//FEATURED PAGES
for( $i = 1; $i <2; $i++ ){

    $wp_customize->add_setting(
        'Fproduct_category_header'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'Fproduct_category_header'.$i,
            array(
                'settings'      => 'Fproduct_category_header'.$i,
                'section'       => 'fcatproproduct_section',
                'label'         => __( 'Product Category Image '.$i, 'supermarket-ecommerce' )
            )
        )
    );

    lzAddImageElement($wp_customize, 'fproduct_category_image'.$i, 'fcatproproduct_section', $label="Recommended Image Size: 600X200px");

    

    lzAddElement($wp_customize, 'fproduct_catelauge_url_'.$i, 'fcatproproduct_section', $type = 'text', $label="Image Link", $callback ='esc_url', $default='Add link here');

}
