<?php

/**
* Offer Settings
*
* @package relax_spa
*/
add_action( 'customize_register', 'relax_spa_customize_offer_option' );
function relax_spa_customize_offer_option(  $wp_customize  ) {
    $wp_customize->add_section( 'relax_spa_offer_section', array(
        'title' => esc_html__( 'Offer Section', 'relax-spa' ),
        'panel' => 'relax_spa_homepage_panel',
    ) );
    if ( fs_relax_spa()->is_free_plan() ) {
        $wp_customize->add_setting( 'relax_spa_offer_section_upgrade_to_pro', array(
            'sanitize_callback' => null,
        ) );
        $wp_customize->add_control( new Relax_Spa_Control_Upgrade_To_Pro($wp_customize, 'relax_spa_offer_section_upgrade_to_pro', array(
            'section'     => 'relax_spa_offer_section',
            'settings'    => 'relax_spa_offer_section_upgrade_to_pro',
            'title'       => __( 'Incorporate a Special Offer section and give your homepage a touch of excitement.', 'relax-spa' ),
            'items'       => array(
                'one'   => array(
                    'title' => __( 'Captivating Offer heading', 'relax-spa' ),
                ),
                'two'   => array(
                    'title' => __( 'Detailed Offer description', 'relax-spa' ),
                ),
                'three' => array(
                    'title' => __( 'Attach Offer image that leaves an impression', 'relax-spa' ),
                ),
                'four'  => array(
                    'title' => __( 'Finish the Offer with a call-to-action button', 'relax-spa' ),
                ),
            ),
            'button_url'  => esc_url( 'https://thebootstrapthemes.com/relax-spa/#free-vs-pro' ),
            'button_text' => __( 'Upgrade Now', 'relax-spa' ),
        )) );
    }
}
