<?php 
    $wp_customize->add_section(
        'facility_area',
        array(
            'title' => __( 'Facility Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );

    $wp_customize->add_setting(
        'facility_area_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'facility_area_disable',
            array(
                'settings'      => 'facility_area_disable',
                'section'       => 'facility_area',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    ); 

backgroundManager($wp_customize, 'facilityus', 'facility_area', $color='#DFDABA', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'facilityarea_padding', 'facility_area', 'Section Padding');

$wp_customize->add_setting(
    'facility_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5.9em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_areaTpadding',
    array(
        'settings'      => 'facility_areaTpadding',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'facility_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3.6em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_areaBpadding',
    array(
        'settings'      => 'facility_areaBpadding',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);


$wp_customize->add_setting(
    'facility_title_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facility_title_heading',
        array(
            'settings'      => 'facility_title_heading',
            'section'       => 'facility_area',
            'label'         => __( 'Section Heading ', 'luzuk-premium' ),
        )
    )
);    


$wp_customize->add_setting(
    'facility_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Become A Member ', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_heading',
    array(
        'settings'      => 'facility_heading',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Heading', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'facsubtext',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Lorem ipsum dolor sit amet,magna aliqua.', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facsubtext',
    array(
        'settings'      => 'facsubtext',
        'section'       => 'facility_area',
        'type'          => 'textarea',
        'label'         => __( 'Text', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'facility_Heading_clr', 'facility_area', 'Heading Color ', '#000');

addColorPalatOption($wp_customize, 'facility_subHeading_clr', 'facility_area', 'Text Color ', '#000');

$wp_customize->add_setting('facilityus_npp_heading_rhs',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facilityus_npp_heading_rhs',
        array(
            'settings'      => 'facilityus_npp_heading_rhs',
            'section'       => 'facility_area',
            'label'         => __( 'Number Of Facility List', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('facility_list_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'facility_list_count',
    array(
        'settings'      => 'facility_list_count',
        'section'       => 'facility_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Facility List To Show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6)
    )
);

//facility PAGES
for( $i = 1; $i <= 6; $i++ ){
    $wp_customize->add_setting(
        'facility_list_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'facility_list_header'.$i,
            array(
                'settings'      => 'facility_list_header'.$i,
                'section'       => 'facility_area',
                'label'         => __( 'List ', 'luzuk-premium' ).$i
            )
        )
    );

     $wp_customize->add_setting(
        'facilityus_list_icon'.$i,
        array(
            'default'           => 'fa fa-hand-o-right',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'facilityus_list_icon'.$i,
            array(
                'settings'      => 'facilityus_list_icon'.$i,
                'section'       => 'facility_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
            )
        )
    );


lzAddElement($wp_customize, 'facility_list_title'.$i, 'facility_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Up to 40% Discount');
}

lzCustomLable($wp_customize, 'facilityarea_listclr', 'facility_area', 'Facility List Color');

addColorPalatOption($wp_customize, 'facility_listiconclr', 'facility_area', 'List Icon Color ', '#fff');

addColorPalatOption($wp_customize, 'facility_listiconhvrclr', 'facility_area', 'List Icon Hover Color ', '#DDA759');

addColorPalatOption($wp_customize, 'facility_listtxtclr', 'facility_area', 'List Text Color ', '#000');

lzCustomLable($wp_customize, 'facilityarea_btnsetting', 'facility_area', 'Section Button Setting');

$wp_customize->add_setting(
    'facbtn_text',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'join Now', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'facbtn_text',
    array(
        'settings'      => 'facbtn_text',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Button Text ', 'Luzuk' )
    )
);

$wp_customize->add_setting('facbtnlink',   
    array('default'=> 'Add Link', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('facbtnlink',
    array(
        'settings'      => 'facbtnlink',
        'section'       => 'facility_area',
        'type'          => 'url',
        'label'         => __( 'Button Link ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'facility_btnclr', 'facility_area', 'Button Text Color ', '#fff');

addColorPalatOption($wp_customize, 'facility_btnhvclr', 'facility_area', 'Button Text Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'facility_btnbgclr', 'facility_area', 'Button BG Color ', '#DDA759');

addColorPalatOption($wp_customize, 'facility_btnbghv', 'facility_area', 'Button BG Hover Color ', '#000');

$wp_customize->add_setting('facilityus_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facilityus_npp_heading',
        array(
            'settings'      => 'facilityus_npp_heading',
            'section'       => 'facility_area',
            'label'         => __( 'Number Of Facility Box', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('facilityus_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'facilityus_npp_count',
    array(
        'settings'      => 'facilityus_npp_count',
        'section'       => 'facility_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Facility Box To Show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6)
    )
);

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

     $wp_customize->add_setting(
        'facilityus_page_icon'.$i,
        array(
            'default'           => 'fa fa-truck',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'facilityus_page_icon'.$i,
            array(
                'settings'      => 'facilityus_page_icon'.$i,
                'section'       => 'facility_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
            )
        )
    );


lzAddElement($wp_customize, 'facilityus_page_title'.$i, 'facility_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Free Shipping');

lzAddElement($wp_customize, 'facility_txt'.$i, 'facility_area', $type = 'textarea', $label="Text", $callback ='luzuk_sanitize_text', $default='Free Shipping On All Us Orders');

}

lzCustomLable($wp_customize, 'fac-clr', 'facility_area' , 'Facility Color');

addColorPalatOption($wp_customize, 'facility_area_boxbg', 'facility_area', 'Facility Box BG Color', '#fff');

addColorPalatOption($wp_customize, 'facility_area_boxbrd', 'facility_area', 'Facility Box Border Color', '#DFDABA');

addColorPalatOption($wp_customize, 'facility_area_icon', 'facility_area', 'Facility Icon Color', '#DFDABA');

addColorPalatOption($wp_customize, 'facility_area_title', 'facility_area', 'Facility Title Color', '#000');

addColorPalatOption($wp_customize, 'facility_area_txt', 'facility_area', 'Facility Text Color', '#535353');



