<?php
/**
 * Business Interface Upsell section in Customizer.
 *
 * @package     Business Interface
 * @since       1.0.0
 */

if (!defined('ABSPATH')) {
    exit;
}

if (!class_exists('Business_Interface_Customizer_Upsell')):
    /**
     * Business Interface Upsell section in Customizer.
     */
    class Business_Interface_Customizer_Upsell
    {

        public function __construct()
        {
            add_filter('business_interface_customizer_options', array($this, 'register_options'));
        }

        public function register_options($options)
        {

            // Section.
            $options['section']['business_interface_upsell_section'] = array(
                'title' => esc_html__('Business Interface Pro', 'business-interface'),
                'priority' => 1,
            );

            // Upsell control.
            $options['setting']['business_interface_upsell_setting'] = array(
                'sanitize_callback' => 'sanitize_text_field',
                'control' => array(
                    'type' => 'business-interface-upsell',
                    'label' => esc_html__('Upgrade to Pro!', 'business-interface'),
                    'description' => esc_html__('Get access to premium starter templates, multiple headers, footer builder, more typography options, advanced WooCommerce integration, and more!', 'business-interface'),
                    'section' => 'business_interface_upsell_section',
                    'priority' => 10,
                    'url' => 'https://wpinterface.com/themes/business-interface/#choose-pricing-plan',
                    'button_text' => esc_html__('View Pro Version', 'business-interface'),
                ),
            );

            return $options;
        }

    }
endif;
new Business_Interface_Customizer_Upsell();
