<?php
/**
 * Topbar Section options
 *
 * @package Theme Palace
 * @subpackage Pushpa
 * @since Pushpa 1.0.0
 */

// Add Topbar section
$wp_customize->add_section( 'pushpa_topbar_section', array(
	'title'             => esc_html__( 'Topbar','pushpa' ),
	'description'       => esc_html__( 'Topbar Section options.', 'pushpa' ),
	'panel'             => 'pushpa_front_page_panel',
) );

// Topbar content enable control and setting
$wp_customize->add_setting( 'pushpa_theme_options[topbar_section_enable]', array(
    'default'           =>  'pushpa_theme_options[topbar_section_enable]',
    'sanitize_callback' => 'pushpa_sanitize_switch_control',
) );

$wp_customize->add_control( new Pushpa_Switch_Control( $wp_customize, 'pushpa_theme_options[topbar_section_enable]', array(
    'label'             => esc_html__( 'Topbar Section Enable', 'pushpa' ),
    'section'           => 'pushpa_topbar_section',
    'on_off_label'      => pushpa_switch_options(),
) ) );

// Topbar content enable control and setting
$wp_customize->add_setting( 'pushpa_theme_options[social_menu_enable]',
    array(
        'default'           =>  $options['social_menu_enable'],
        'sanitize_callback' => 'pushpa_sanitize_switch_control',
    )
);
 
 $wp_customize->add_control( new Pushpa_Switch_Control( $wp_customize,
    'pushpa_theme_options[social_menu_enable]',
        array(
            'label'             => esc_html__( 'Social Menu Enable', 'pushpa' ),
            'description'       => sprintf( '%1$s <a class="topbar-menu-trigger" href="#"> %2$s </a> %3$s', esc_html__( 'Note: To show social menu.', 'pushpa' ), esc_html__( 'Click Here', 'pushpa' ), esc_html__( 'to create menu', 'pushpa' ) ),
            'section'           => 'pushpa_topbar_section',
            'on_off_label'      => pushpa_switch_options(),
            'active_callback'   => 'pushpa_is_topbar_section_enable'
        )
    )
);

$wp_customize->add_setting( 'pushpa_theme_options[search_from_enable', array(
    'sanitize_callback' => 'pushpa_sanitize_switch_control',
    'default'           => 'pushpa_theme_options[search_from_enable',
) );

$wp_customize->add_control( new Pushpa_Switch_Control( $wp_customize, 'pushpa_theme_options[search_from_enable', array(
    'label'             => esc_html__( 'Enable Search', 'pushpa' ),
    'section'           => 'pushpa_topbar_section',
    'on_off_label'      => pushpa_switch_options(),
    'active_callback'   => 'pushpa_is_topbar_section_enable'
) ) );