﻿<?php

namespace WPRCore\Widgets;

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use \Elementor\Utils;
use \Elementor\Control_Media;
use \Elementor\Group_Control_Image_Size;
use \Elementor\Group_Control_Border;
use \Elementor\Group_Control_Box_Shadow;
use \Elementor\Group_Control_Text_Shadow;
use \Elementor\Group_Control_Typography;
use \Elementor\Core\Schemes\Typography;
use \Elementor\Group_Control_Background;
use WPRCore\Elementor\Controls\Group_Control_WPRGradient;
use \Elementor\Repeater;


if (!defined('ABSPATH'))
    exit; // Exit if accessed directly

/**
 * Wpr Core
 *
 * Elementor widget for hello world.
 *
 * @since 1.0.0
 */
class WPR_Header_Sidebar extends Widget_Base
{

    use WPR_Style_Trait, WPR_Icon_Trait, WPR_Column_Trait, WPR_Query_Trait;

    /**
     * Retrieve the widget name.
     *
     * @since 1.0.0
     *
     * @access public
     *
     * @return string Widget name.
     */
    public function get_name()
    {
        return 'wpr-header-sidebar';
    }

    /**
     * Retrieve the widget title.
     *
     * @since 1.0.0
     *
     * @access public
     *
     * @return string Widget title.
     */
    public function get_title()
    {
        return __(WPRCORE_THEME_NAME . ' - Header Sidebar', 'wprealizer-core');
    }

    /**
     * Retrieve the widget icon.
     *
     * @since 1.0.0
     *
     * @access public
     *
     * @return string Widget icon.
     */
    public function get_icon()
    {
        return 'wpr-icon ulicon';
    }

    /**
     * Retrieve the list of categories the widget belongs to.
     *
     * Used to determine where to display the widget in the editor.
     *
     * Note that currently Elementor supports only one category.
     * When multiple categories passed, Elementor uses the first one.
     *
     * @since 1.0.0
     *
     * @access public
     *
     * @return array Widget categories.
     */
    public function get_categories()
    {
        return ['wprealizer-core'];
    }

    /**
     * Retrieve the list of scripts the widget depended on.
     *
     * Used to set scripts dependencies required to run the widget.
     *
     * @since 1.0.0
     *
     * @access public
     *
     * @return array Widget scripts dependencies.
     */
    public function get_script_depends()
    {
        return ['wprealizer-core'];
    }

    protected function register_controls()
    {
        $this->register_controls_section();
        $this->style_tab_content();
    }

    protected function register_controls_section()
    {
        // layout Panel
        $this->start_controls_section(
          'wpr_layout',
          [
            'label' => esc_html__('Design Layout', 'wprealizer-core'),
          ]
        );

        $this->add_control(
          'wpr_design_style',
          [
            'label' => esc_html__('Select Layout', 'wprealizer-core'),
            'type' => Controls_Manager::SELECT,
            'options' => [
              'layout-1' => esc_html__('Layout 1', 'wprealizer-core'),
              'layout-2' => esc_html__('Layout 2', 'wprealizer-core'),
              'layout-3' => esc_html__('Layout 3', 'wprealizer-core'),
              // 'layout-4' => esc_html__('Layout 4', 'wprealizer-core'),
            ],
            'default' => 'layout-1',
          ]
        );

        $this->end_controls_section();

        // Offcanvas Controls
        $this->start_controls_section(
            'wpr_offcanvas_section',
            [
                'label' => esc_html__('Offcanvas', 'wprealizer-core'),
                'tab' => Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'toggle_image',
            [
                'label' => esc_html__('Choose Toggle Image', 'wprcore'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [
                    'url' => \Elementor\Utils::get_placeholder_image_src(),
                ],
                'condition'   => ['wpr_design_style'   => ['layout-10']]

            ]
        );

        $this->add_control(
            'wpr_menubar_text',
            [
                'label' => esc_html__('ManuBar Text', 'wprealizer-core'),
                'type' => Controls_Manager::TEXT,
                'default' => esc_html__('Manu', 'wprealizer-core'),
                'title' => esc_html__('Enter manubar text', 'wprealizer-core'),
                'label_block' => true,
                'separator' => 'before',
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $this->add_control(
            'wpr_offcanvas_logo',
            [
                'label' => esc_html__('Choose Offcanvas Logo', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [
                    'url' => \Elementor\Utils::get_placeholder_image_src(),
                ]
            ]
        );

        $this->add_group_control(
            Group_Control_Image_Size::get_type(),
            [
                'name' => 'wpr_offcanvas_logo_size',
                'label' => __('Image Size', 'wprealizer-core'),
                'default' => 'medium',
            ]
        );

        $this->add_control(
            'wpr_offcanvas_footer_logo',
            [
                'label' => esc_html__('Choose Footer Logo', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [
                    'url' => \Elementor\Utils::get_placeholder_image_src(),
                ],
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $this->add_control(
            'offcanvas_title',
            [
                'label' => esc_html__('Offcanvas Title', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => esc_html__('Offcanvas Title', 'wprealizer-core'),
                'placeholder' => esc_html__('Hello There!', 'wprealizer-core'),
                'label_block' => true,
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        ); 

        $this->add_control(
            'offcanvas_description',
            [
                'label' => esc_html__('Offcanvas Description', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::TEXTAREA,
                'default' => esc_html__('Description', 'wprealizer-core'),
                'placeholder' => esc_html__('Your Text', 'wprealizer-core'),
                'label_block' => true,
            ]
        ); 

        $this->add_control(
            'offcanvas_copyright',
            [
                'label' => esc_html__('Offcanvas Copyright', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::TEXTAREA,
                'default' => esc_html__('Â© 2025. All rights reserved Orvio.', 'wprealizer-core'),
                'placeholder' => esc_html__('Your Copyright', 'wprealizer-core'),
                'label_block' => true,
                'condition' => [
                    'wpr_design_style' => ['layout-1', 'layout-2', 'layout-3']
                ]
            ]
        ); 

        $this->add_control(
            'offcanvas_contact_title',
            [
                'label' => esc_html__('Offcanvas Contact Title', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => esc_html__('Contact Title', 'wprealizer-core'),
                'placeholder' => esc_html__('Contact Title', 'wprealizer-core'),
                'label_block' => true,
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $this->add_control(
            'offcanvas_social_title',
            [
                'label' => esc_html__('Social Title', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::TEXTAREA,
                'default' => esc_html__('Connect Us On', 'wprealizer-core'),
                'placeholder' => esc_html__('Your Social Title', 'wprealizer-core'),
                'label_block' => true,
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        ); 

        $this->add_control(
            'wpr_offcanvas_type',
            [
                'label' => esc_html__('Select Type', 'wprealizer-core'),
                'type' => Controls_Manager::SELECT,
                'options' => [
                    'default' => esc_html__('Default', 'wprealizer-core'),
                ],
                'default' => 'default',
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $offcanvas = array(
            'post_type' => 'wpr-offcanvas',
            'posts_per_page' => -1,
        );
        $offcanvas_loop = get_posts($offcanvas);

        $offcanvas_obj = array();
        foreach ($offcanvas_loop as $post) {
            $offcanvas_obj[$post->ID] = $post->post_title;
        }

        $this->add_control(
            'wpr_offcanvas_template',
            [
                'label' => esc_html__('Select Template', 'wprealizer-core'),
                'type' => Controls_Manager::SELECT,
                'options' => $offcanvas_obj,
                'default' => 'default',
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'wpr_sidebar_gallery',
            [
                'label' => esc_html__('Sidebar Gallery', 'wprealizer-core'),
                'description' => esc_html__('Sidebar Gallery', 'wprealizer-core'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $repeater = new \Elementor\Repeater();

        $repeater->add_control(
            'wpr_sidebar_gallery_image',
            [
                'label' => esc_html__('Upload Image', 'wprealizer-core'),
                'type' => Controls_Manager::MEDIA,
                'default' => [
                    'url' => Utils::get_placeholder_image_src(),
                ]
            ]
        );

        $this->add_control(
            'sidebar_gallery_list',
            [
                'label' => esc_html__('Gallery List', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $repeater->get_controls(),
                'default' => [
                    [
                        'wpr_sidebar_gallery_image' => esc_html__('Slider Image 1', 'wprealizer-core')
                    ],
                    [
                        'wpr_sidebar_gallery_image' => esc_html__('Slider Image 2', 'wprealizer-core')
                    ],
                    [
                        'wpr_sidebar_gallery_image' => esc_html__('Slider Image 3', 'wprealizer-core')
                    ],
                ],
                'title_field' => '{{{ wpr_sidebar_gallery_image }}}',
            ]
        );
        $this->end_controls_section();

        $this->start_controls_section(
            'wpr_contact_box_section',
            [
                'label' => esc_html__('Contact Repeater', 'wprealizer-core'),
                'tab' => Controls_Manager::TAB_CONTENT,
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $repeater = new Repeater();

        // tp_render_icon_controls($repeater, 'icon_box', );

        $repeater->add_control(
            'wpr_contact_label',
            [
                'label' => esc_html__('Contact Label', 'wprealizer-core'),
                'type' => Controls_Manager::TEXT,
                'default' => esc_html__('Contact Label', 'wprealizer-core'),
                'label_block' => true,
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $repeater->add_control(
            'wpr_contact_value',
            [
                'label' => esc_html__('Contact Value', 'wprealizer-core'),
                'type' => Controls_Manager::TEXTAREA,
                'default' => esc_html__('Contact Value', 'wprealizer-core'),
                'label_block' => true,
            ]
        );

        $repeater->add_control(
            'wpr_contact_url',
            [
                'label' => esc_html__('Contact URL', 'wprealizer-core'),
                'type' => Controls_Manager::TEXTAREA,
                'default' => 'Url Here',
                'label_block' => true,
                'description' => __("We recommended to put with tel: and mailto:", 'wprealizer-core')
            ]
        );

        $repeater->add_control(
            'wpr_rep_style_options',
            [
                'label' => esc_html__('Enable Style Option', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::SWITCHER,
                'label_on' => esc_html__('Yes', 'wprealizer-core'),
                'label_off' => esc_html__('No', 'wprealizer-core'),
                'return_value' => 'yes',
                'default' => 'no',
                'separator' => 'before',
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $repeater->add_control(
            'wpr_icon_box_bg',
            [
                'label' => esc_html__('Repeater Title Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} {{CURRENT_ITEM}} .contact-thumb' => 'background-color: {{VALUE}}',
                ],
                'separator' => 'before',
                'condition' => [
                    'wpr_rep_style_options' => 'yes',
                ]
            ]
        );

        $this->add_control(
            'wpr_contact_list',
            [
                'label' => esc_html__('Text List', 'wprealizer-core'),
                'type' => Controls_Manager::REPEATER,
                'fields' => $repeater->get_controls(),
                'default' => [
                    [
                        'wpr_contact_value' => esc_html__('+2230 6965 119', 'wprealizer-core'),
                    ],
                    [
                        'wpr_contact_value' => esc_html__('orvio@gmail.com', 'wprealizer-core'),
                    ],
                    [
                        'wpr_contact_value' => esc_html__('Avenue de Roma 1588, Lisboa', 'wprealizer-core'),
                    ],
                ],
                'title_field' => '{{{ wpr_contact_label }}}',
            ]
        );

        $this->end_controls_section();


        $this->start_controls_section(
            'wpr_offcanvas_social_section',
            [
                'label' => esc_html__('Offcanvas Social Repeater', 'wprealizer-core'),
                'tab' => Controls_Manager::TAB_CONTENT,
            ]
        );

        $repeater = new Repeater();

        $repeater->add_control(
            'show_social',
            [
                'label' => __('Show Social Links?', 'wprcore'),
                'type' => Controls_Manager::SWITCHER,
                'label_on' => __('Yes', 'wprcore'),
                'label_off' => __('No', 'wprcore'),
                'return_value' => 'yes',
                'style_transfer' => true,
            ]
        );

        $repeater->add_control(
            'web_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Website Address', 'wprcore'),
                'placeholder' => __('Add your profile link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'email_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Email', 'wprcore'),
                'placeholder' => __('Add your email link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'phone_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Phone', 'wprcore'),
                'placeholder' => __('Add your phone link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'facebook_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Facebook', 'wprcore'),
                'default' => __('#', 'wprcore'),
                'placeholder' => __('Add your facebook link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'twitter_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('X', 'wprcore'),
                'default' => __('#', 'wprcore'),
                'placeholder' => __('Add your X link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'instagram_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Instagram', 'wprcore'),
                'default' => __('#', 'wprcore'),
                'placeholder' => __('Add your instagram link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'linkedin_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('LinkedIn', 'wprcore'),
                'placeholder' => __('Add your linkedin link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'youtube_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Youtube', 'wprcore'),
                'placeholder' => __('Add your youtube link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'googleplus_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Google Plus', 'wprcore'),
                'placeholder' => __('Add your Google Plus link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'flickr_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Flickr', 'wprcore'),
                'placeholder' => __('Add your flickr link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'vimeo_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Vimeo', 'wprcore'),
                'placeholder' => __('Add your vimeo link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'behance_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Behance', 'wprcore'),
                'placeholder' => __('Add your hehance link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'dribble_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Dribbble', 'wprcore'),
                'placeholder' => __('Add your dribbble link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'pinterest_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Pinterest', 'wprcore'),
                'placeholder' => __('Add your pinterest link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $repeater->add_control(
            'gitub_title',
            [
                'type' => Controls_Manager::TEXT,
                'label_block' => false,
                'label' => __('Github', 'wprcore'),
                'placeholder' => __('Add your github link', 'wprcore'),
                'dynamic' => [
                    'active' => true,
                ]
            ]
        );

        $this->add_control(
            'wpr_social_repeater',
            [
                'show_label' => false,
                'type' => Controls_Manager::REPEATER,
                'fields' => $repeater->get_controls(),
                'title_field' => esc_html__('Social List', 'wprealizer-core'),
                'default' => [
                    [
                        'facebook_title' => __('', 'wprealizer-core')
                    ]
                ]
            ]
        );

        $this->end_controls_section();

       // Header Right
        $this->start_controls_section(
            'wpr_header_sidebar_button',
            [
                'label' => esc_html__('Sidebar Button', 'wprealizer-core'),
                'condition' => [
                    'wpr_design_style' => ['layout-10']
                ]
            ]
        );

        $this->add_control(
            'tp_theme_btn_text',
            [
                'label' => esc_html__('Button Text', 'wprealizer-core'),
                'type' => Controls_Manager::TEXT,
                'default' => esc_html__('Lets Talk', 'wprealizer-core'),
                'title' => esc_html__('Enter button text', 'wprealizer-core'),
                'label_block' => true,
                'separator' => 'before',
            ]
        );

        $this->add_control(
            'tp_theme_btn_link_type',
            [
                'label' => esc_html__('Button Link Type', 'wprealizer-core'),
                'type' => Controls_Manager::SELECT,
                'options' => [
                    '1' => 'Custom Link',
                    '2' => 'Internal Page',
                ],
                'default' => '1',
                'label_block' => true,
            ]
        );
        $this->add_control(
            'tp_theme_btn_link',
            [
                'label' => esc_html__('Button link', 'wprealizer-core'),
                'type' => Controls_Manager::URL,
                'dynamic' => [
                    'active' => true,
                ],
                'placeholder' => esc_html__('https://your-link.com', 'wprealizer-core'),
                'show_external' => false,
                'default' => [
                    'url' => '#',
                    'is_external' => false,
                    'nofollow' => false,
                ],
                'condition' => [
                    'tp_theme_btn_link_type' => '1',
                ],
                'label_block' => true,
            ]
        );
        $this->add_control(
            'tp_theme_btn_page_link',
            [
                'label' => esc_html__('Select Button Link Page', 'wprealizer-core'),
                'type' => Controls_Manager::SELECT2,
                'label_block' => true,
                'options' => tp_get_all_types_post('page'),
                'condition' => [
                    'tp_theme_btn_link_type' => '2',
                ]
            ]
        );

        $this->end_controls_section();

    }

    // style_tab_content
    protected function style_tab_content()
    {
        // Close Btn style
        $this->start_controls_section(
            'wpr_mobile_close_btn_style_section',
            [
                'label' => esc_html__('Close Button', 'wprealizer-core'),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'wpr_mobile_close_btn_typography',
                'label' => esc_html__('Typography', 'wprealizer-core'),
                'selector' => '{{WRAPPER}} .offcanvas__close-btn',
            ]
        );

        $this->start_controls_tabs(
            'close_button_style_tabs'
        );

        $this->start_controls_tab(
            'close_button_style_normal_tab',
            [
                'label' => esc_html__('Normal', 'wprealizer-core'),
            ]
        );

        $this->add_control(
            'wpr_close_button_menu_title_color',
            [
                'label' => esc_html__('Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .offcanvas__close-btn svg' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_close_button_menu_toggle_color',
            [
                'label' => esc_html__('Bg Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .offcanvas__close-btn' => 'background-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_close_button_border_color',
            [
                'label' => esc_html__('Border Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .offcanvas__close-btn svg, {{WRAPPER}} .offcanvas__close-btn i' => 'border-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->end_controls_tab();

        $this->start_controls_tab(
            'close_button_style_hover_tab',
            [
                'label' => esc_html__('Hover', 'wprealizer-core'),
            ]
        );

        $this->add_control(
            'wpr_close_button_menu_title_hvr_color',
            [
                'label' => esc_html__('Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .offcanvas__close-btn:hover' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_close_button_menu_title_hvrbg_color',
            [
                'label' => esc_html__('Bg Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .offcanvas__close-btn:hover' => 'background-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_close_button_border_hvr_color',
            [
                'label' => esc_html__('Border Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .offcanvas__close-btn:hover svg, {{WRAPPER}} .offcanvas__close-btn:hover i' => 'border-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->end_controls_tab();

        $this->end_controls_tabs();

        $this->end_controls_section();

        // offcanvas style
        $this->start_controls_section(
            'wpr_offcanvas_style_section',
            [
                'label' => esc_html__('Offcanvas Style', 'wprealizer-core'),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_control(
            'wpr_offcanvas_togglebar_color',
            [
                'label' => esc_html__('togglebar Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-toggle-menubar' => 'background-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_toggtext_color',
            [
                'label' => esc_html__('Toggle text Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-toggle-menubar i' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_bg_color',
            [
                'label' => esc_html__('Offcanvas BG Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-offcanvas-bg' => 'background-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_title',
            [
                'label' => esc_html__('Offcanvas Title', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-offcanvas-title' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_desc',
            [
                'label' => esc_html__('Offcanvas Description', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-offcanvas-desc' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_copyright',
            [
                'label' => esc_html__('Offcanvas Copyright', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-offcanvas-copyright' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_contact_title',
            [
                'label' => esc_html__('Offcanvas Contact Title', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-offcanvas-contact-title' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_offcanvas_social_title',
            [
                'label' => esc_html__('Offcanvas Social Title', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-offcanvas-social-title' => 'color: {{VALUE}} !important',
                ],
            ]
        );


        $this->end_controls_section();

        // Header Social
        $this->start_controls_section(
            'wpr_header_social_section',
            [
                'label' => esc_html__( 'Header Social', 'wprealizer-core' ),
                'tab'   => Controls_Manager::TAB_STYLE,
            ]
        );

        // Typography for Header Social Icons
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'     => 'wpr_header_social_typography',
                'label'    => esc_html__( 'Typography', 'wprealizer-core' ),
                'selector' => '{{WRAPPER}} .wpr-header-social ul li a',
            ]
        );

        $this->start_controls_tabs( 'header_social_style_tabs' );

        // Normal State
        $this->start_controls_tab(
            'header_social_style_normal_tab',
            [
                'label' => esc_html__( 'Normal', 'wprealizer-core' ),
            ]
        );

        $this->add_control(
            'wpr_header_social_icon_color',
            [
                'label'     => esc_html__( 'Color', 'wprealizer-core' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-header-social ul li a' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_header_social_icon_bg_color',
            [
                'label'     => esc_html__( 'Bg Color', 'wprealizer-core' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-header-social ul li a' => 'background-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->end_controls_tab();

        // Hover State
        $this->start_controls_tab(
            'header_social_style_hover_tab',
            [
                'label' => esc_html__( 'Hover', 'wprealizer-core' ),
            ]
        );

        $this->add_control(
            'wpr_header_social_icon_hover_color',
            [
                'label'     => esc_html__( 'Color', 'wprealizer-core' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-header-social ul li a:hover' => 'color: {{VALUE}} !important',
                ],
            ]
        );

        $this->add_control(
            'wpr_header_social_icon_hover_bg_color',
            [
                'label'     => esc_html__( 'Bg Color', 'wprealizer-core' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-header-social ul li a:hover' => 'background-color: {{VALUE}} !important',
                ],
            ]
        );

        $this->end_controls_tab();

        $this->end_controls_tabs();

        // Additional Styling Controls for Header Social

        // Padding
        $this->add_responsive_control(
            'wpr_header_social_padding',
            [
                'label'      => esc_html__( 'Padding', 'wprealizer-core' ),
                'type'       => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors'  => [
                    '{{WRAPPER}} .wpr-header-social ul li a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        // Margin
        $this->add_responsive_control(
            'wpr_header_social_margin',
            [
                'label'      => esc_html__( 'Margin', 'wprealizer-core' ),
                'type'       => Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%', 'em' ],
                'selectors'  => [
                    '{{WRAPPER}} .wpr-header-social ul li a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        // Border
        $this->add_group_control(
            Group_Control_Border::get_type(),
            [
                'name'     => 'wpr_header_social_border',
                'label'    => esc_html__( 'Border', 'wprealizer-core' ),
                'selector' => '{{WRAPPER}} .wpr-header-social ul li a',
            ]
        );

        // Border Radius
        $this->add_responsive_control(
            'wpr_header_social_border_radius',
            [
                'label'      => esc_html__( 'Border Radius', 'wprealizer-core' ),
                'type'       => Controls_Manager::SLIDER,
                'size_units' => [ 'px', '%' ],
                'range'      => [
                    'px' => [
                        'min' => 0,
                        'max' => 100,
                    ],
                    '%' => [
                        'min' => 0,
                        'max' => 50,
                    ],
                ],
                'selectors'  => [
                    '{{WRAPPER}} .wpr-header-social ul li a' => 'border-radius: {{SIZE}}{{UNIT}};',
                ],
            ]
        );

        // Box Shadow
        $this->add_group_control(
            Group_Control_Box_Shadow::get_type(),
            [
                'name'     => 'wpr_header_social_box_shadow',
                'label'    => esc_html__( 'Box Shadow', 'wprealizer-core' ),
                'selector' => '{{WRAPPER}} .wpr-header-social ul li a',
            ]
        );

        $this->end_controls_section();



        $this->start_controls_section(
            'tp_theme_btn_style_sec',
            [
                'label' => esc_html__('Button Style', 'wprealizer-core'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'tp_theme_btn_typography',
                'label' => esc_html__('Typhography', 'wprealizer-core'),
                'selector' => '{{WRAPPER}} .wpr-el-theme-btn, {{WRAPPER}} .wpr-el-theme-circle-btn .rotate',
            ]
        );

        $this->add_control(
            'tp_theme_btn_icon_image_size',
            [
                'label' => esc_html__('Icon Image Size', 'wprealizer-core'),
                'type' => Controls_Manager::SLIDER,
                'size_units' => ['px', 'em'],
                'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 100000,
                        'step' => 10,
                    ],
                    'em' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 0.1,
                    ],
                ],
                'default' => [
                    'unit' => 'px',
                    'size' => '',
                ],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn .theme-btn-icon img' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
                ],
                'condition' => [
                    'tp_theme_btn_icon_show' => 'yes',
                    'tp_theme_btn_icon_type' => 'image'
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_icon_size',
            [
                'label' => esc_html__('Icon Size', 'wprealizer-core'),
                'type' => Controls_Manager::SLIDER,
                'size_units' => ['px', 'em'],
                'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 1000,
                        'step' => 1,
                    ],
                    'em' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 0.1,
                    ],
                ],
                'default' => [
                    'unit' => 'px',
                    'size' => '',
                ],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn .theme-btn-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
                ],
                'condition' => [
                    'tp_theme_btn_icon_show' => 'yes',
                    'tp_theme_btn_icon_type' => 'icon'
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_icon_svg_size',
            [
                'label' => esc_html__('Icon SVG Size', 'wprealizer-core'),
                'type' => Controls_Manager::SLIDER,
                'size_units' => ['px', 'em'],
                'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 1000,
                        'step' => 1,
                    ],
                    'em' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 0.1,
                    ],
                ],
                'default' => [
                    'unit' => 'px',
                    'size' => '',
                ],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn .theme-btn-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
                ],
                'condition' => [
                    'tp_theme_btn_icon_show' => 'yes',
                    'tp_theme_btn_icon_type' => 'svg'
                ],
            ]
        );

        $this->start_controls_tabs(
            'tp_theme_btn_state_tabs',
        );

        // button normal state
        $this->start_controls_tab(
            'tp_theme_btn_normal_tab',
            [
                'label' => esc_html__('Normal', 'wprealizer-core'),
            ]
        );

        $this->add_control(
            'tp_theme_btn_color',
            [
                'label' => esc_html__('Text Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn, .wpr-el-theme-circle-btn .rotate' => 'color: {{VALUE}};',
                ],
            ]
        );
        $this->add_control(
            'tp_theme_btn_icon_color',
            [
                'label' => esc_html__('Icon Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn .theme-btn-icon' => 'color: {{VALUE}};',
                ],
                'condition' => [
                    'tp_theme_btn_icon_show' => 'yes',
                    'tp_theme_btn_icon_type' => 'icon'
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_bg_color',
            [
                'label' => esc_html__('Background Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn' => 'background-color: {{VALUE}};',
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_line_color',
            [
                'label' => esc_html__('Button Line Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-line-btn:before' => 'background: {{VALUE}};',
                ],
                'condition' => [
                    'tp_theme_btn_line_effect' => 'yes'
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Border::get_type(),
            [
                'name' => 'tp_theme_btn_border',
                'selector' => '{{WRAPPER}} .wpr-el-theme-btn',
            ]
        );

        $this->add_control(
            'tp_theme_btn_border_radius',
            [
                'label' => esc_html__('Border Radius', 'wprealizer-core'),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => ['px', '%'],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Box_Shadow::get_type(),
            [
                'name' => 'tp_theme_btn_box_shadow',
                'selector' => '{{WRAPPER}} .wpr-el-theme-btn',
            ]
        );

        $this->end_controls_tab();
        // end normal state

        // button hover state
        $this->start_controls_tab(
            'tp_theme_btn_hover_tab',
            [
                'label' => esc_html__('Hover', 'wprealizer-core'),
            ]
        );

        $this->add_control(
            'tp_theme_btn_hover_color',
            [
                'label' => esc_html__('Text Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn:hover' => 'color: {{VALUE}};',
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_hover_icon_color',
            [
                'label' => esc_html__('Icon Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn:hover .theme-btn-icon' => 'color: {{VALUE}};',
                ],
                'condition' => [
                    'tp_theme_btn_icon_show' => 'yes',
                    'tp_theme_btn_icon_type' => 'icon'
                ],

            ]
        );

        $this->add_control(
            'tp_theme_btn_hover_bg_color',
            [
                'label' => esc_html__('Background Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn:hover' => 'background-color: {{VALUE}};',
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_line_hvr_color',
            [
                'label' => esc_html__('Line Hover Color', 'wprealizer-core'),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-line-btn:after' => 'background: {{VALUE}};',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Border::get_type(),
            [
                'name' => 'tp_theme_btn_hover_border',
                'selector' => '{{WRAPPER}} .wpr-el-theme-btn:hover',
            ]
        );

        $this->add_control(
            'tp_theme_btn_hover_border_radius',
            [
                'label' => esc_html__('Border Radius', 'wprealizer-core'),
                'type' => Controls_Manager::DIMENSIONS,
                'size_units' => ['px', '%'],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Box_Shadow::get_type(),
            [
                'name' => 'tp_theme_btn_hover_box_shadow',
                'selector' => '{{WRAPPER}} .wpr-el-theme-btn:hover',
            ]
        );

        $this->end_controls_tab();
        // end hover state


        $this->end_controls_tabs();
        // end button state tabs

        $this->add_control(
            'tp_theme_btn_margin',
            [
                'label' => esc_html__('Button Margin', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => ['px', '%', 'em'],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->add_control(
            'tp_theme_btn_padding',
            [
                'label' => esc_html__('Button Padding', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => ['px', '%', 'em'],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );
        $this->add_control(
            'tp_theme_btn_icon_margin',
            [
                'label' => esc_html__('Icon Margin', 'wprealizer-core'),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => ['px', '%', 'em'],
                'selectors' => [
                    '{{WRAPPER}} .wpr-el-theme-btn .theme-btn-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->end_controls_section();
    }

    /**
     * Render the widget output on the frontend.
     *
     * Written in PHP and used to generate the final HTML.
     *
     * @since 1.0.0
     *
     * @access protected
     */
    protected function render()
    {
        $settings = $this->get_settings_for_display();

        $thisSettings = $this->get_settings();

        // $btn_id = 'theme_btn';

        // Get the button link type
        $btn_link_type = $settings['tp_theme_btn_link_type'];

        // Default URL
        $url = '#';

        // Handle Custom Link
        if ($btn_link_type == '1' && !empty($settings['tp_theme_btn_link']['url'])) {
            $url = $settings['tp_theme_btn_link']['url'];
        }
        // Handle Internal Page Link
        elseif ($btn_link_type == '2' && !empty($settings['tp_theme_btn_page_link'])) {
            $page_id = $settings['tp_theme_btn_page_link'];
            $url = get_permalink($page_id);
        }


        $offcanvas_image_size = tp_get_img_size($settings, 'wpr_offcanvas_logo_size');

        if (!empty($settings['wpr_offcanvas_logo']['url'])) {
            $offcanvas_logo = !empty($settings['wpr_offcanvas_logo']['id']) ? wp_get_attachment_image_url($settings['wpr_offcanvas_logo']['id'], true) : $settings['wpr_offcanvas_logo']['url'];
            $offcanvas_logo_alt = get_post_meta($settings["wpr_offcanvas_logo"]["id"], "_wp_attachment_image_alt", true);
        }

        if (!empty($settings['wpr_offcanvas_footer_logo']['url'])) {
            $offcanvas_footer_logo = !empty($settings['wpr_offcanvas_footer_logo']['id']) ? wp_get_attachment_image_url($settings['wpr_offcanvas_footer_logo']['id'], true) : $settings['wpr_offcanvas_footer_logo']['url'];
            $offcanvas_footer_logo_alt = get_post_meta($settings["wpr_offcanvas_footer_logo"]["id"], "_wp_attachment_image_alt", true);
        }

    ?>


    <?php if ($settings['wpr_design_style'] == 'layout-3') : ?>

        <div class="header__main-menu v2">
            <div class="menu-btns">
              <button
                class="hamburger-menu"
                type="button"
                data-bs-toggle="offcanvas"
                data-bs-target="#offcanvasRight"
                aria-controls="offcanvasRight"
              >
                <span class="hamburger-bar"></span>
                <span class="hamburger-bar"></span>
                <span class="hamburger-bar"></span>
              </button>
            </div>
        </div>

        <!-- Orvio Header sidebar -->
        <?php include(WPRCORE_ELEMENTS_PATH . '/header-side/header-side-3.php'); ?>

    <?php elseif ($settings['wpr_design_style'] == 'layout-4') : 

        $this->tp_link_attributes_render('theme_btn', 'common-btn wpr-el-theme-btn', $this->get_settings());

    ?>


        <div class="header__main-menuBar justify-content-end">
            <?php if (!empty($settings['tp_theme_btn_text'])): ?>
            <a <?php echo $this->get_render_attribute_string('tp-button-arg' . $btn_id . ''); ?>>
                <?php echo tp_kses($settings['tp_theme_btn_text']); ?>
                <div class="button-icon-wrap">
                    <svg class="button-icon button-icon-one" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
                        <path d="M13.4674 11.468L13.4674 6.51554L8.51498 6.51554" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>
                            <path d="M6.53246 13.4507L13.3982 6.58496" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round">
                        </path>
                    </svg>
                    <svg class="button-icon button-icon-two" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
                        <path d="M13.4674 11.468L13.4674 6.51554L8.51498 6.51554" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round">
                        </path>
                        <path d="M6.53246 13.4507L13.3982 6.58496" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>
                    </svg>
                </div>
            </a>
            <?php endif; ?>

            <div class="menuBar-toggle d-lg-none wpr-toggle-menubar" data-bs-toggle="offcanvas" data-bs-target="#offcanvasLeft" aria-controls="offcanvasLeft">
                <span class="bg-white"></span>
                <span class="bg-white"></span>
                <span class="bg-white"></span>
            </div>
        </div>

        <!-- Orvio Header sidebar -->
        <?php include(WPRCORE_ELEMENTS_PATH . '/header-side/header-side-1.php'); ?>

    <?php elseif ($settings['wpr_design_style'] == 'layout-5') : 

        $this->tp_link_attributes_render('theme_btn', 'common-btn wpr-el-theme-btn', $this->get_settings());
    ?>

        <div class="header__main-menuBar justify-content-end wpr-toggle-menubar">
            <?php echo tp_kses($settings['wpr_menubar_text']); ?>
            <div class="menuBar-toggle"
                data-bs-toggle="offcanvas"
                data-bs-target="#offcanvasLeft"
                aria-controls="offcanvasLeft">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>

        <!-- Orvio Header sidebar -->
        <?php include(WPRCORE_ELEMENTS_PATH . '/header-side/header-side-1.php'); ?>

    <?php elseif ($settings['wpr_design_style'] == 'layout-2') : 
        $this->tp_link_attributes_render('theme_btn', 'common-btn wpr-el-theme-btn', $this->get_settings());
        ?>

        <div class="header__main-menu v3">
            <div class="menu-btns">
                <button
                    class="hamburger-menu"
                    type="button"
                    data-bs-toggle="offcanvas"
                    data-bs-target="#offcanvasRight"
                    aria-controls="offcanvasRight">
                    <span class="hamburger-bar"></span>
                    <span class="hamburger-bar"></span>
                </button>
            </div>
        </div>

        <!-- Orvio Header sidebar -->
        <?php include(WPRCORE_ELEMENTS_PATH . '/header-side/header-side-2.php'); ?>

    <?php else : 

        $this->tp_link_attributes_render('theme_btn', 'common-btn wpr-el-theme-btn', $this->get_settings());

        ?>

        <div class="header__menu-btns">
            <button
              class="hamburger-menu"
              type="button"
              data-bs-toggle="offcanvas"
              data-bs-target="#offcanvasRight"
              aria-controls="offcanvasRight">
              <span class="hamburger-bar"></span>
              <span class="hamburger-bar"></span>
            </button>
        </div>

        <!-- Orvio Header sidebar -->
        <?php include(WPRCORE_ELEMENTS_PATH . '/header-side/header-side-1.php'); ?>

    <?php endif; ?>
<?php

    }
}

$widgets_manager->register(new WPR_Header_Sidebar());
