<?php

/**
 * Header Layout Settings
 *
 * @package chic-lifestyle
 */
add_action( 'customize_register', 'chic_lifestyle_header_layout_section' );
function chic_lifestyle_header_layout_section(  $wp_customize  ) {
    $wp_customize->add_section( 'chic_lifestyle_header_layout_section', array(
        'title'      => esc_html__( 'Header Layout', 'chic-lifestyle' ),
        'panel'      => 'chic_lifestyle_header_panel',
        'priority'   => 6,
        'capability' => 'edit_theme_options',
    ) );
    $wp_customize->add_setting( 'chic_lifestyle_header_sticky_menu_option', array(
        'sanitize_callback' => 'chic_lifestyle_sanitize_checkbox',
        'default'           => false,
    ) );
    $wp_customize->add_control( 'chic_lifestyle_header_sticky_menu_option', array(
        'label'       => esc_attr__( 'Main menu sticky?', 'chic-lifestyle' ),
        'description' => esc_attr__( 'Check the box to make the main menu sticky.', 'chic-lifestyle' ),
        'section'     => 'chic_lifestyle_header_layout_section',
        'settings'    => 'chic_lifestyle_header_sticky_menu_option',
        'type'        => 'checkbox',
    ) );
    $wp_customize->add_setting( 'chic_lifestyle_header_layouts_upgrade_to_pro', array(
        'sanitize_callback' => null,
    ) );
    $wp_customize->add_control( new Chic_Lifestyle_Control_Upgrade_To_Pro($wp_customize, 'chic_lifestyle_header_layouts_upgrade_to_pro', array(
        'section'     => 'chic_lifestyle_header_layout_section',
        'settings'    => 'chic_lifestyle_header_layouts_upgrade_to_pro',
        'title'       => __( 'Arrange the elements in the header of your website to match your preferred style.', 'chic-lifestyle' ),
        'items'       => array(
            'one' => array(
                'title' => __( 'Choose between three beautiful layouts for your website header', 'chic-lifestyle' ),
            ),
        ),
        'button_url'  => esc_url( 'https://thebootstrapthemes.com/chic-lifestyle/#free-vs-pro' ),
        'button_text' => __( 'Upgrade Now', 'chic-lifestyle' ),
    )) );
}
