<?php
/**
 * Createing an Our Pets pannel for customizer
 */

// START ABOUT SECTION 
$wp_customize->add_section(
    'production_section',
    array(
        'title' => __( 'Production Section', 'luzuk-premium' ),
        'panel' => 'luzuk_premium_home_panel'
    )
);
    // ENABLE/DISABLE FEATURED SECTION
$wp_customize->add_setting(
    'production_section_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'production_section_disable',
        array(
            'settings'      => 'production_section_disable',
            'section'       => 'production_section',
            'label'         => __( 'Disable Section', 'luzuk-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk-premium' ),
                'off' => __( 'No', 'luzuk-premium' )
            ),
        )
    )
);

backgroundManager($wp_customize, 'production', 'production_section', $color='#fdfdfd', get_template_directory_uri().'/images/default-gray.png', 'img');


lzCustomLable($wp_customize, 'luzuk_productionsectionpadding', 'production_section', 'Section Padding');

$wp_customize->add_setting(
    'sec_productionTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_productionTpadding',
    array(
        'settings'      => 'sec_productionTpadding',
        'section'       => 'production_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_productionBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '4em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_productionBpadding',
    array(
        'settings'      => 'sec_productionBpadding',
        'section'       => 'production_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk' )
    )
);

lzCustomLable($wp_customize, 'luzuk_produheading', 'production_section', 'Section Sub Heading & Heading');


$wp_customize->add_setting(
    'production_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Industries & Production', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'production_subtitle',
    array(
        'settings'      => 'production_subtitle',
        'section'       => 'production_section',
        'type'          => 'text',
        'label'         => __( 'Section Sub Heading', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'product_subheadclr', 'production_section', 'Section Sub Heading Color', '#f04f55');


$wp_customize->add_setting(
    'production_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Lets Experience Exclusive Quality', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'production_title',
    array(
        'settings'      => 'production_title',
        'section'       => 'production_section',
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'product_headclr', 'production_section', 'Section Heading Color', '#000');


$wp_customize->add_setting('luzuk_productionslb_section_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'luzuk_productionslb_section_lbl',
        array(
            'settings'      => 'luzuk_productionslb_section_lbl',
            'section'       => 'production_section',
            'label'         => __( 'Note:', 'Luzuk' ),    
            'description'   => __( 'Changes will not reflect unless you select an image', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting('luzuk_production_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_production_npp_heading',
        array(
            'settings'      => 'luzuk_production_npp_heading',
            'section'       => 'production_section',
            'label'         => __( 'Number Of production To Show', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_production_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'luzuk_production_npp_count',
    array(
        'settings'      => 'luzuk_production_npp_count',
        'section'       => 'production_section',
        'type'          => 'select',
        'label'         => __( 'Number of Section Box to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

//about PAGES
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'luzuk_production_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_production_header'.$i,
            array(
                'settings'      => 'luzuk_production_header'.$i,
                'section'       => 'production_section',
                'label'         => __( 'Section Box ', 'luzuk-premium' ).$i
            )
        )
    );

    //lzAddImageElement($wp_customize, 'production_page_icon1'.$i, 'production_section', $label="Recommended Image Size: 290X275px");

$wp_customize->add_setting(
        'production_page_icon1'.$i,
        array(
            'default'           => 'fa fa-newspaper-o',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'production_page_icon1'.$i,
            array(
                'settings'      => 'production_page_icon1'.$i,
                'section'       => 'production_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'Luzuk' ),
            )
        )
    );

lzAddElement($wp_customize, 'production_page_title_'.$i, 'production_section', $type = 'text', $label="Section Title", $callback ='luzuk_sanitize_text', $default='Artistic Direction');


lzAddElement($wp_customize, 'production_page_text'.$i, 'production_section', $type = 'textarea', $label="Description", $callback ='luzuk_sanitize_text', $default='Assist collection strategies, storage, application and pest production management.');

lzAddElement($wp_customize, 'production_num'.$i, 'production_section', $type = 'text', $label="Description", $callback ='luzuk_sanitize_text', $default='1');

lzAddElement($wp_customize, 'luzuk_production_page_url_'.$i, 'production_section', $type = 'text', $label="Featured Page Link", $callback ='esc_url', $default='Add link here');

}
  
lzCustomLable($wp_customize, 'productioncolor', 'production_section', 'Section Colors');

addColorPalatOption($wp_customize, 'product_pageaddbxbg', 'production_section', 'Section Box Background Color', '#fff');

addColorPalatOption($wp_customize, 'product_pageevnbxbg', 'production_section', 'Section Box Border Color', '#d5d4d4');

addColorPalatOption($wp_customize, 'product_pageicn', 'production_section', 'Section Icon Color', '#f04f55');

addColorPalatOption($wp_customize, 'product_pagettl', 'production_section', 'Section Title Color ', '#000');

addColorPalatOption($wp_customize, 'product_pagettlhv', 'production_section', 'Section Title Hover Color ', '#f04f55');

addColorPalatOption($wp_customize, 'product_pagetxt', 'production_section', 'Section Text Color ', '#939497');

addColorPalatOption($wp_customize, 'product_pageno', 'production_section', 'Section Number Color ', '#fff');

addColorPalatOption($wp_customize, 'product_pagenobg', 'production_section', 'Section Number Background Color ', '#f04f55');

addColorPalatOption($wp_customize, 'product_pagenobghv', 'production_section', 'Section Number Background Hover Color ', '#000');