<?php

// START Gym Timing & Address SECTION
$wp_customize->add_section(
    'lz_fitness_time_n_address',
    array(
        'title'=> __('Timing & Address', 'luzuk-premium'),
        'panel'=> 'lz_fitness_premium_home_panel'
    )
);
$wp_customize->add_setting(
    'lz_fitness_time_n_address_disabled',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'lz_fitness_time_n_address_disabled',
        array(
            'settings'=>'lz_fitness_time_n_address_disabled',
            'section'=>'lz_fitness_time_n_address',
            'label'=>__('Disable Section', 'luzuk-premium'),
            'on_off_label'=> array(
                'on'=> __('Yes', 'luzuk-premium'),
                'off'=> __('No', 'luzuk-premium')
            )
        )
    )
);

backgroundManager($wp_customize, 'gym', 'lz_fitness_time_n_address', $color='#fff', get_template_directory_uri().'/images/sleep.jpg', 'img');

$wp_customize->add_setting(
   'lz_fitness_time_n_address_into', 
   array(
      'sanitize_callback'=>'lz_fitness_sanitize_text'
  )
);
$wp_customize->add_control(
   new lz_fitness_Customize_Heading(
      $wp_customize, 
      'lz_fitness_time_n_address_into', 
      array(
         'settings'=>'lz_fitness_time_n_address_into', 
         'section'=>'lz_fitness_time_n_address', 
         'label'=>__('Section Title & Sub Title', 'luzuk-premium')
     )
  )
);
$wp_customize->add_setting(
   'lz_fitness_time_n_address_title', 
   array(
      'sanitize_callback' => 'lz_fitness_sanitize_text', 
      'default'=> __('Timing & Address', 'luzuk-premium')
  )
);
$wp_customize->add_control(
   'lz_fitness_time_n_address_title', 
   array(
      'settings'=>'lz_fitness_time_n_address_title', 
      'section'=>'lz_fitness_time_n_address', 
      'type'=>'text', 
      'label'=> __('Title', 'luzuk-premium')
  )
);
$wp_customize->add_setting(
   'lz_fitness_time_n_address_subtitle',
   array(
      'sanitize_callback' => 'lz_fitness_sanitize_text', 
      'default'=> __('Here goes the short description for the section', 'luzuk-premium')
  )
);
$wp_customize->add_control(
   'lz_fitness_time_n_address_subtitle',
   array(
      'settings'=>'lz_fitness_time_n_address_subtitle', 
      'section'=>'lz_fitness_time_n_address', 
      'type'=>'textarea', 
      'label'=> __('Sub Title', 'luzuk-premium')
  )
);

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_gym_HeadingColor', 'lz_fitness_time_n_address', 'Heading color', '#ffffff');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_gym_TextColor', 'lz_fitness_time_n_address', 'Text color', '#ffffff');

/* video */
//------------------------------------
// Adding the Label
lzCustomLable($wp_customize, 'lz_fitness_time_n_address_lblTxt', 'lz_fitness_time_n_address', 'Video Embade Code');

//add text BOX FOR TITLE
lzAddElement($wp_customize, 'lz_fitness_video_title', 'lz_fitness_time_n_address', 'text', $label = "Title", 'lz_fitness_sanitize_text', 'Two or three words');
//add text BOX FOR TITLE
lzAddElement($wp_customize, 'lz_fitness_video_sub_title', 'lz_fitness_time_n_address', 'text', $label = "Title", 'lz_fitness_sanitize_text', 'Restaurent Video');

//ADD TEXT BOX FOR FORM SHORTCODE
lzAddElement($wp_customize, 'lz_fitness_time_n_address_video', 'lz_fitness_time_n_address', 'textarea', $label = "Video embade code", '', 'Video embade code'); //lz_fitness_sanitize_text
// $wp_customize->add_setting('lz_fitness_contactus_embade', array(/*'sanitize_callback' => 'esc_url_raw',*/ 'default'=>'Add your map embade code'));

//------------------------------------

$wp_customize->add_setting(
   'lz_fitness_time_n_address_time_section', 
   array(
      'sanitize_callback'=> 'lz_fitness_sanitize_text',
			// 'default'           => __( 'Timeings', 'luzuk-premium' )
  )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_time_n_address_time_section', 
        array(
           'settings'=>'lz_fitness_time_n_address_time_section', 
           'section'=>'lz_fitness_time_n_address', 
           'label'=>__('Timing', 'luzuk-premium')
       )
    )
);

$days = array('Monday', 'Tuesday','Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
    //Gym time
foreach ($days as $i => $value) {
    $wp_customize->add_setting(
       'lz_fitness_time_n_address_time_'.($i+1), 
       array(
          'sanitize_callback' => 'lz_fitness_sanitize_text', 
          'default' => __( '5:00 AM - 12:00 PM', 'luzuk-premium' )
      )
   );
    $wp_customize->add_control(
       'lz_fitness_time_n_address_time_'.($i+1), 
       array(
          'settings'=>'lz_fitness_time_n_address_time_'.($i+1), 
          'section'=>'lz_fitness_time_n_address', 
          'type'=>'text', 
          'label'=> __($value, 'luzuk-premium')
      )
   );
    
}

