<?php
/**
 * Teams Settings
 *
 * @package relax_spa
 */
add_action( 'customize_register', 'relax_spa_customize_teams_section' );

function relax_spa_customize_teams_section( $wp_customize ) {

    $wp_customize->add_section('relax_spa_teams_sections', array(
        'title' => esc_html__('Teams Section', 'relax-spa'),
        'description' => esc_html__('Teams Section :', 'relax-spa'),
        'panel' => 'relax_spa_homepage_panel'
    ));

    $wp_customize->add_setting('bs_teams_display_option', array(
        'sanitize_callback' => 'relax_spa_sanitize_checkbox',
        'default' => true
    ));

    $wp_customize->add_control(new Relax_Spa_Toggle_Control($wp_customize, 'bs_teams_display_option', array(
        'label' => esc_html__('Hide / Show', 'relax-spa'),
        'section' => 'relax_spa_teams_sections',
        'settings' => 'bs_teams_display_option',
        'type'=> 'relax-spa-toggle',
    )));

    $wp_customize->add_setting('bs_top_heading_for_teams', array(
        'sanitize_callback' => 'sanitize_text_field',
        'transport' => 'postMessage',
        'default' => ''
    ));

    $wp_customize->add_control('bs_top_heading_for_teams', array(
        'label' => esc_html__('Enter Top Heading for Teams', 'relax-spa'),
        'section' => 'relax_spa_teams_sections',
        'type' => 'text',
    ));

    $wp_customize->add_setting('bs_heading_for_teams', array(
        'sanitize_callback' => 'sanitize_text_field',
        'transport' => 'postMessage',
        'default' => ''
    ));

    $wp_customize->add_control('bs_heading_for_teams', array(
        'label' => esc_html__('Enter Main Heading for Teams', 'relax-spa'),
        'section' => 'relax_spa_teams_sections',
        'type' => 'text',
    ));

    $wp_customize->selective_refresh->add_partial( 'bs_teams_display_option', array(
        'selector' => '.team > .container',
      ) ); 

}