<?php
namespace EcafeAddons\Widgets;

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Utils;
use Elementor\Group_Control_Typography;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Text_Shadow;
use Elementor\Group_Control_Text_Stroke;

use EcafeAddons\EcafeElementLoad;

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

class Ecafe_Accordion extends Widget_Base {

	public function get_name() {
		return 'ecafe-accordion';
	}

	public function get_title() {
		return esc_html__( 'Accordion', 'essential-classy-addons-for-elementor' );
	}

	public function get_icon() {
		return 'ecafe-ele-back-icon ecafe-accordion-icon';
	}

	public function get_categories() {
		return array( 'essential' );
	}

	public function get_keywords() {
		return array( 'accordion', 'faq', 'toggle', 'tabs', 'vertical tab', 'collapsible', 'expandable', 'foldable' );
	}

	public function get_script_depends() {
		return array( 'ecafe-accordion' );
	}
	public function get_custom_help_url() {
		return 'https://store.kapasias.com/helpdesk/';
	}
	public function has_widget_inner_wrapper(): bool {
		return ! \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
	}
	protected function register_controls() {

		$this->start_controls_section(
			'content_section',
			array(
				'label' => esc_html__( 'Content', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			)
		);
		$repeater = new \Elementor\Repeater();
		$repeater->add_control(
			'accTitle',
			array(
				'label'       => esc_html__( 'Title', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::TEXT,
				'default'     => esc_html__( 'Accordion Title', 'essential-classy-addons-for-elementor' ),
				'dynamic'     => array( 'active' => true ),
				'label_block' => true,
			)
		);
		$repeater->add_control(
			'accContentType',
			array(
				'label'   => esc_html__( 'Source', 'essential-classy-addons-for-elementor' ),
				'type'    => Controls_Manager::SELECT,
				'default' => 'content',
				'options' => array(
					'content'       => esc_html__( 'Content', 'essential-classy-addons-for-elementor' ),
					'page_template' => esc_html__( 'Page Template', 'essential-classy-addons-for-elementor' ),
				),
			)
		);
		$repeater->add_control(
			'accContent',
			array(
				'label'      => esc_html__( 'Content', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::WYSIWYG,
				'default'    => esc_html__( 'Accordion Content', 'essential-classy-addons-for-elementor' ),
				'show_label' => false,
				'dynamic'    => array( 'active' => true ),
				'condition'  => array(
					'accContentType' => array( 'content' ),
				),
			)
		);
		$repeater->add_control(
			'accContentTemplate',
			array(
				'label'       => esc_html__( 'Elementor Templates', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::SELECT,
				'default'     => '0',
				'options'     => \EcafeHelper::getTemplates(),
				'label_block' => 'true',
				'condition'   => array(
					'accContentType' => 'page_template',
				),
			)
		);
		$repeater->add_control(
			'backendVisible',
			array(
				'label'       => esc_html__( 'Backend Visibility', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::SWITCHER,
				'default'     => 'no',
				'label_on'    => esc_html__( 'Show', 'essential-classy-addons-for-elementor' ),
				'label_off'   => esc_html__( 'Hide', 'essential-classy-addons-for-elementor' ),
				'description' => esc_html__( 'Note : Visible in the backend.', 'essential-classy-addons-for-elementor' ),
				'separator'   => 'after',
				'condition'   => array(
					'accContentType' => 'page_template',
				),
			)
		);
		$repeater->add_control(
			'iconFontawesome',
			array(
				'label' => esc_html__( 'Icon Library', 'essential-classy-addons-for-elementor' ),
				'type'  => Controls_Manager::ICONS,
			)
		);
		$this->add_control(
			'accordionTabs',
			array(
				'label'       => '',
				'type'        => Controls_Manager::REPEATER,
				'fields'      => $repeater->get_controls(),
				'default'     => array(
					array(
						'accTitle'   => esc_html__( 'Accordion #1', 'essential-classy-addons-for-elementor' ),
						'accContent' => esc_html__( 'I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'essential-classy-addons-for-elementor' ),
					),
					array(
						'accTitle'   => esc_html__( 'Accordion #2', 'essential-classy-addons-for-elementor' ),
						'accContent' => esc_html__( 'I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'essential-classy-addons-for-elementor' ),
					),
				),
				'title_field' => '{{{ accTitle }}}',
			)
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'extras_section',
			array(
				'label' => esc_html__( 'Extras', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			)
		);
		$this->add_control(
			'openCloseIcon',
			array(
				'label'     => esc_html__( 'Open/Close Icon', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SWITCHER,
				'default'   => 'yes',
				'label_on'  => esc_html__( 'Show', 'essential-classy-addons-for-elementor' ),
				'label_off' => esc_html__( 'Hide', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'openIcon',
			array(
				'label'     => esc_html__( 'Open Icon', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::ICONS,
				'default'   => array(
					'value'   => 'fas fa-plus',
					'library' => 'solid',
				),
				'condition' => array(
					'openCloseIcon' => 'yes',
				),
			)
		);
		$this->add_control(
			'closeIcon',
			array(
				'label'     => esc_html__( 'Close Icon', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::ICONS,
				'default'   => array(
					'value'   => 'fas fa-minus',
					'library' => 'solid',
				),
				'condition' => array(
					'openCloseIcon' => 'yes',
				),
			)
		);
		$this->add_control(
			'titleTag',
			array(
				'label'     => esc_html__( 'Title Tag', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SELECT,
				'options'   => \EcafeHelper::getHtmlTag(),
				'default'   => 'div',
				'separator' => 'before',
			)
		);
		$this->add_control(
			'titleAlign',
			array(
				'label'       => esc_html__( 'Title Alignment', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::CHOOSE,
				'options'     => array(
					'text-left'   => array(
						'title' => esc_html__( 'Left', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-left',
					),
					'text-center' => array(
						'title' => esc_html__( 'Center', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-center',
					),
					'text-right'  => array(
						'title' => esc_html__( 'Right', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-right',
					),
				),
				'default'     => 'text-left',
				'label_block' => false,
				'condition'   => array(
					'openCloseIcon' => 'yes',
					'iconAlign'     => 'left',
				),
			)
		);
		$this->add_control(
			'accActive',
			array(
				'label'     => esc_html__( 'Active Accordion', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SELECT,
				'default'   => '1',
				'options'   => \EcafeHelper::getNumbers( 1, 20, 'none' ),
				'separator' => 'before',
			)
		);
		$this->add_control(
			'accOnHover',
			array(
				'label'     => esc_html__( 'On Hover', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SWITCHER,
				'default'   => 'no',
				'label_on'  => esc_html__( 'Enable', 'essential-classy-addons-for-elementor' ),
				'label_off' => esc_html__( 'Disable', 'essential-classy-addons-for-elementor' ),
				'separator' => 'before',
			)
		);
		$this->add_control(
			'accMulti',
			array(
				'label'     => esc_html__( 'Multi Open', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SWITCHER,
				'default'   => 'no',
				'label_on'  => esc_html__( 'Enable', 'essential-classy-addons-for-elementor' ),
				'label_off' => esc_html__( 'Disable', 'essential-classy-addons-for-elementor' ),
				'separator' => 'before',
			)
		);
		$this->add_control(
			'accSearch',
			array(
				'label'     => esc_html__( 'Search Option', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SWITCHER,
				'default'   => 'no',
				'label_on'  => esc_html__( 'Enable', 'essential-classy-addons-for-elementor' ),
				'label_off' => esc_html__( 'Disable', 'essential-classy-addons-for-elementor' ),
				'separator' => 'before',
			)
		);
		$this->add_control(
			'accSearchIcon',
			array(
				'label'     => esc_html__( 'Icon', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::ICONS,
				'default'   => array(
					'value'   => 'fas fa-search',
					'library' => 'solid',
				),
				'condition' => array(
					'accSearch' => 'yes',
				),
			)
		);
		$this->add_control(
			'accSearchPlaceholder',
			array(
				'label'       => esc_html__( 'Placeholder', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::TEXT,
				'default'     => esc_html__( 'Search...', 'essential-classy-addons-for-elementor' ),
				'dynamic'     => array( 'active' => true ),
				'label_block' => true,
				'condition'   => array(
					'accSearch' => 'yes',
				),
			)
		);
		$this->add_control(
			'accAutoplay',
			array(
				'label'     => esc_html__( 'Autoplay', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::SWITCHER,
				'default'   => 'no',
				'label_on'  => esc_html__( 'Enable', 'essential-classy-addons-for-elementor' ),
				'label_off' => esc_html__( 'Disable', 'essential-classy-addons-for-elementor' ),
				'separator' => 'before',
			)
		);
		$this->add_control(
			'accAutoplayDuration',
			array(
				'label'     => __( 'Duration', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::NUMBER,
				'min'       => 1,
				'max'       => 30000,
				'step'      => 100,
				'default'   => 5000,
				'condition' => array(
					'accAutoplay' => 'yes',
				),
			)
		);
		$this->add_control(
			'accAutoplayLoop',
			array(
				'label'     => __( 'Loop', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::NUMBER,
				'min'       => -1,
				'max'       => 25,
				'step'      => 1,
				'default'   => 1,
				'condition' => array(
					'accAutoplay' => 'yes',
				),
			)
		);
		$this->end_controls_section();

		/*Tippy Tooltip Options*/
		include ECAFE_PATH . 'element/widgets/ecafe-tippy-options.php';

		/*Notice panel*/
		$ecwidgetdemolink = esc_url( 'https://ecaddons.com/elements/accordion/' );
		$ecwidgetdoclink  = esc_url( 'https://ecaddons.com/docs/accordion-widget-tutorial/' );
		include ECAFE_PATH . 'element/widgets/ecafe-widgetpanel-help.php';

		/*
		style start*/
		/*icon start*/
		$this->start_controls_section(
			'iconStyling',
			array(
				'label' => esc_html__( 'Icon', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_control(
			'iconAlign',
			array(
				'label'       => esc_html__( 'Alignment', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::CHOOSE,
				'options'     => array(
					'left'  => array(
						'title' => esc_html__( 'Start', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-h-align-left',
					),
					'right' => array(
						'title' => esc_html__( 'End', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-h-align-right',
					),
				),
				'default'     => is_rtl() ? 'right' : 'left',
				'toggle'      => false,
				'label_block' => false,
				'condition'   => array(
					'openCloseIcon' => 'yes',
				),
			)
		);
		$this->add_responsive_control(
			'iconPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'iconMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'iconSize',
			array(
				'label'      => esc_html__( 'Size', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( 'px', '%' ),
				'range'      => array(
					'px' => array(
						'min' => 1,
						'max' => 500,
					),
					'%'  => array(
						'min'  => 1,
						'max'  => 100,
						'step' => 1,
					),
				),
				'default'    => array(
					'unit' => 'px',
					'size' => 20,
				),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened' => 'font-size:{{SIZE}}{{UNIT}};',
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed svg,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened svg' => 'width:{{SIZE}}{{UNIT}};height:{{SIZE}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabsIcontyle' );
		$this->start_controls_tab(
			'tabIconNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'iconColorNorm',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened' => 'color: {{VALUE}};',
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed svg,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened svg' => 'fill: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'iconBgNorm',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'iconBorderNorm',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened',
			)
		);
		$this->add_responsive_control(
			'iconBrNorm',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'iconShadowNorm',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title .elementor-accordion-icon .elementor-accordion-icon-opened',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabIconHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'iconColorHover',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-opened,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-opened' => 'color: {{VALUE}};',
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-closed svg,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-opened svg,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-closed svg,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-opened svg' => 'fill: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'iconBgHover',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-opened,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-opened',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'iconBorderHover',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-opened,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-opened',
			)
		);
		$this->add_responsive_control(
			'iconBrHover',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-opened,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-opened' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'iconShadowHover',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .elementor-accordion-icon .elementor-accordion-icon-opened,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-closed,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .elementor-accordion-icon .elementor-accordion-icon-opened',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();
		/*icon end*/

		/*title start*/
		$this->start_controls_section(
			'titleStyling',
			array(
				'label' => esc_html__( 'Title', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_responsive_control(
			'titlePadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'titleMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'titleTypo',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in',
			)
		);
		$this->add_responsive_control(
			'svgIconSize',
			array(
				'label'      => esc_html__( 'Svg Size', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( 'px', '%' ),
				'range'      => array(
					'px' => array(
						'min' => 1,
						'max' => 500,
					),
					'%'  => array(
						'min'  => 1,
						'max'  => 100,
						'step' => 1,
					),
				),
				'default'    => array(
					'unit' => 'px',
					'size' => 20,
				),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in svg' => 'width:{{SIZE}}{{UNIT}};height:{{SIZE}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabsTitletyle' );
		$this->start_controls_tab(
			'tabTitleNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'titleColorNorm',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in' => 'color: {{VALUE}};',
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in svg' => 'fill: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'titleBgNorm',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'titleBorderNorm',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in',
			)
		);
		$this->add_responsive_control(
			'titleBrNorm',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'titleShadowNorm',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'titleTextShadowNorm',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Stroke::get_type(),
			array(
				'name'     => 'titleTextStrokeN',
				'label'    => esc_html__( 'Text Stroke', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title .eca-accordion-header-in',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabTitleHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'titleColorHover',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in' => 'color: {{VALUE}};',
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in svg,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in svg' => 'fill: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'titleBgHover',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'titleBorderHover',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in',
			)
		);
		$this->add_responsive_control(
			'titleBrHover',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
					{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'titleShadowHover',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'titleTextShadowHover',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Stroke::get_type(),
			array(
				'name'     => 'titleTextStrokeH',
				'label'    => esc_html__( 'Text Stroke', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover .eca-accordion-header-in,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion .eca-accordion-header-in',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();
		/*title end*/

		/*icon-title start*/
		$this->start_controls_section(
			'iconTitleStyling',
			array(
				'label' => esc_html__( 'Icon & Title Box', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_responsive_control(
			'iconTitlePadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'iconTitleMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .eca-accordion-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabsIconTitleStyle' );
		$this->start_controls_tab(
			'iconTitleContentNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'iconTitleBgNorm',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'iconTitleBorderNorm',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title',
			)
		);
		$this->add_responsive_control(
			'iconTitleBrNorm',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'iconTitleShadowNorm',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabIconTitleHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'iconTitleBgHover',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'iconTitleBorderHover',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion',
			)
		);
		$this->add_responsive_control(
			'iconTitleBrHover',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'iconTitleShadowHover',
				'selector' => '{{WRAPPER}} .elementor-accordion .elementor-tab-title:hover,
				{{WRAPPER}} .elementor-accordion .elementor-tab-title.active-accordion',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();
		/*icon-title end*/

		/*content start*/
		$this->start_controls_section(
			'contentStyling',
			array(
				'label' => esc_html__( 'Content', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_control(
			'contentAlign',
			array(
				'label'       => esc_html__( 'Alignment', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::CHOOSE,
				'options'     => array(
					'left'   => array(
						'title' => esc_html__( 'Left', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-left',
					),
					'center' => array(
						'title' => esc_html__( 'Center', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-center',
					),
					'right'  => array(
						'title' => esc_html__( 'Right', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-right',
					),
				),
				'selectors'   => array(
					'{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content' => 'text-align: {{VALUE}};',
				),
				'default'     => 'text-left',
				'label_block' => false,
			)
		);
		$this->add_responsive_control(
			'contentPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'contentOuterPadding',
			array(
				'label'      => esc_html__( 'Outer Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item .eca-accordion-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'contentMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'contentTypo',
				'selector' => '{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content',
			)
		);
		$this->add_control(
			'contentColorNorm',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'contentBgNorm',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'contentBorderNorm',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content',
			)
		);
		$this->add_responsive_control(
			'contentBrNorm',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'contentShadowNorm',
				'selector' => '{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'contentTextShadowNorm',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Stroke::get_type(),
			array(
				'name'     => 'contentTextStrokeN',
				'label'    => esc_html__( 'Text Stroke', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .elementor-accordion .eca-content-editor.norm-content',
			)
		);
		$this->end_controls_section();
		/*content end*/

		/*item start*/
		$this->start_controls_section(
			'itemStyling',
			array(
				'label' => esc_html__( 'Item', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_responsive_control(
			'itemMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabsItemStyle' );
		$this->start_controls_tab(
			'tabItemN',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'itemBgN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'itemBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item',
			)
		);
		$this->add_responsive_control(
			'itemBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'itemShadowN',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabItemActive',
			array(
				'label' => esc_html__( 'Active', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'itemBgA',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item.active',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'itemBorderA',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item.active',
			)
		);
		$this->add_responsive_control(
			'itemBrA',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item.active' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'itemShadowA',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-item.active',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();
		/*item end*/

		$this->start_controls_section(
			'itemProgessStyling',
			array(
				'label'     => esc_html__( 'Item Progress', 'essential-classy-addons-for-elementor' ),
				'tab'       => Controls_Manager::TAB_STYLE,
				'condition' => array(
					'accAutoplay' => 'yes',
				),
			)
		);
		$this->add_responsive_control(
			'itemProgessHeight',
			array(
				'label'      => esc_html__( 'Height', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( 'px' ),
				'range'      => array(
					'px' => array(
						'min' => 1,
						'max' => 500,
					),
				),
				'default'    => array(
					'unit' => 'px',
					'size' => 3,
				),
				'selectors'  => array(
					'{{WRAPPER}} .ec-acc-autoplayprogress .eca-accordion-progress-bar' => 'height:{{SIZE}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'itemProgessBg',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-acc-autoplayprogress .eca-accordion-progress-bar',
			)
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'searchStyling',
			array(
				'label'     => esc_html__( 'Search', 'essential-classy-addons-for-elementor' ),
				'tab'       => Controls_Manager::TAB_STYLE,
				'condition' => array(
					'accSearch' => 'yes',
				),
			)
		);
		$this->add_responsive_control(
			'accSearchWidth',
			array(
				'label'      => esc_html__( 'Width', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( '%' ),
				'range'      => array(
					'%' => array(
						'min'  => 1,
						'max'  => 100,
						'step' => 1,
					),
				),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search' => 'width:{{SIZE}}%;',
				),
			)
		);
		$this->add_control(
			'accSearchAlign',
			array(
				'label'       => esc_html__( 'Alignment', 'essential-classy-addons-for-elementor' ),
				'type'        => Controls_Manager::CHOOSE,
				'options'     => array(
					'left'   => array(
						'title' => esc_html__( 'Left', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-left',
					),
					'center' => array(
						'title' => esc_html__( 'Center', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-center',
					),
					'right'  => array(
						'title' => esc_html__( 'Right', 'essential-classy-addons-for-elementor' ),
						'icon'  => 'eicon-text-align-right',
					),
				),
				'default'     => 'left',
				'label_block' => false,
			)
		);
		$this->add_responsive_control(
			'searchPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'accSearchMarginBottom',
			array(
				'label'      => esc_html__( 'Bottom Gap', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( 'px' ),
				'range'      => array(
					'px' => array(
						'min'  => 1,
						'max'  => 50,
						'step' => 1,
					),
				),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search' => 'margin-bottom:{{SIZE}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'searchTypo',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input,{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input::placeholder',
			)
		);
		$this->add_control(
			'searchColor',
			array(
				'label'     => esc_html__( 'Placeholder Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input::placeholder' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_responsive_control(
			'searchiconSize',
			array(
				'label'      => esc_html__( 'Search Icon Size', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( 'px', '%' ),
				'range'      => array(
					'px' => array(
						'min' => 1,
						'max' => 500,
					),
					'%'  => array(
						'min'  => 1,
						'max'  => 100,
						'step' => 1,
					),
				),
				'default'    => array(
					'unit' => 'px',
					'size' => 15,
				),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon i:before' => 'font-size:{{SIZE}}{{UNIT}};',
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon svg' => 'width:{{SIZE}}{{UNIT}};height:{{SIZE}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'searchiconleftoffset',
			array(
				'label'      => esc_html__( 'Icon Left Offset', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::SLIDER,
				'size_units' => array( '%', 'px' ),
				'range'      => array(
					'px' => array(
						'min'  => 1,
						'max'  => 100,
						'step' => 1,
					),
					'%'  => array(
						'min'  => 1,
						'max'  => 100,
						'step' => 1,
					),
				),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon' => 'left:{{SIZE}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabssearchstyle' );
		$this->start_controls_tab(
			'tabsearchNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'searchColorN',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'SearchiconColorN',
			array(
				'label'     => esc_html__( 'Icon Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon i:before' => 'color: {{VALUE}};',
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon svg' => 'fill: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'searchBgN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'searchBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input',
			)
		);
		$this->add_responsive_control(
			'searchBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'searchShadowN',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'searchTextShadowN',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabsearchFocus',
			array(
				'label' => esc_html__( 'Focus', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'searchColorF',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input:focus' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'SearchiconColorF',
			array(
				'label'     => esc_html__( 'Icon Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon:focus i:before' => 'color: {{VALUE}};',
					'{{WRAPPER}} .eca-accordion-wrapper .ec-accordion-search-icon:focus svg' => 'fill: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'searchBgF',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input:focus',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'searchBorderF',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input:focus',
			)
		);
		$this->add_responsive_control(
			'searchBrF',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'searchShadowF',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input:focus',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'searchTextShadowF',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper .eca-accordion-search-input:focus',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();

		/*box start*/
		$this->start_controls_section(
			'boxStyling',
			array(
				'label' => esc_html__( 'Box', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_responsive_control(
			'boxPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabsBoxtyle' );
		$this->start_controls_tab(
			'tabBoxNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'boxBgNorm',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'boxBorderNorm',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper',
			)
		);
		$this->add_responsive_control(
			'boxBrNorm',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'boxShadowNorm',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabBoxHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'boxBgHover',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper:hover',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'boxBorderHover',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper:hover',
			)
		);
		$this->add_responsive_control(
			'boxBrHover',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .eca-accordion-wrapper:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'boxShadowHover',
				'selector' => '{{WRAPPER}} .eca-accordion-wrapper:hover',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();
		/*
		box end*/
		/*style end*/
	}

	protected function render() {

		$settings     = $this->get_settings_for_display();
		$uid          = uniqid( 'accordion' );
		$id_int       = substr( $this->get_id_int(), 0, 3 );
		$EleTemplates = \Elementor\Plugin::instance()->templates_manager->get_source( 'local' )->get_items();
		$accSearch    = ! empty( $settings['accSearch'] ) ? $settings['accSearch'] : '';
		$dataAttr     = array(
			'data-id'          => esc_attr( $uid ),
			'type'             => ( isset( $settings['accOnHover'] ) && $settings['accOnHover'] == 'yes' ) ? 'mouseenter' : 'click',
			'multi'            => ( isset( $settings['accMulti'] ) && $settings['accMulti'] == 'yes' ) ? 'yes' : 'no',
			'speed'            => 300,
			'search'           => ( isset( $accSearch ) && $accSearch == 'yes' ) ? 'yes' : 'no',
			'autoplay'         => ( isset( $settings['accAutoplay'] ) && $settings['accAutoplay'] == 'yes' ) ? 'yes' : 'no',
			'autoplayduration' => ! empty( $settings['accAutoplayDuration'] ) ? esc_attr( $settings['accAutoplayDuration'] ) : 5000,
			'accautoplayloop'  => ! empty( $settings['accAutoplayLoop'] ) ? esc_attr( $settings['accAutoplayLoop'] ) : 1,
		);

		$accAutoplayClass = '';
		if ( isset( $settings['accAutoplay'] ) && $settings['accAutoplay'] == 'yes' ) {
			$accAutoplayClass = ' ec-acc-autoplayprogress';
		}

		$tippyclass  = '';
		$tippyrender = '';
		if ( isset( $settings['tippyTooltip'] ) && $settings['tippyTooltip'] === 'yes' ) {
			/*Tippy Tooltip Render*/
			include ECAFE_PATH . 'element/widgets/ecafe-tippy-render.php';
		}

		$output = '<div class="eca-accordion-wrapper elementor-accordion eca-icon-pos' . esc_attr( $settings['iconAlign'] ) . ' ' . esc_attr( $uid ) . ' ' . esc_attr( $accAutoplayClass ) . ' ' . esc_attr( $tippyclass ) . '" data-settings=\'' . json_encode( $dataAttr ) . '\'  role="tablist" ' . $tippyrender . '>';
		if ( ! empty( $settings['accordionTabs'] ) ) {

			if ( ! empty( $accSearch ) && $accSearch == 'yes' ) {
					$accSearchPlaceholder = ! empty( $settings['accSearchPlaceholder'] ) ? $settings['accSearchPlaceholder'] : 'Search...';
					$accSearchIcon        = ! empty( $settings['accSearchIcon'] ) ? $settings['accSearchIcon'] : '';
					$searchIcon           = '';
				if ( ! empty( $accSearchIcon ) ) {
					ob_start();
					\Elementor\Icons_Manager::render_icon( $accSearchIcon, array( 'aria-hidden' => 'true' ) );
					$searchIcon = '<span class="ec-accordion-search-icon">' . ob_get_contents() . '</span>';
					ob_end_clean();
				}
					$align = ! empty( $settings['accSearchAlign'] ) ? $settings['accSearchAlign'] : 'left';

					$output .= '<div class="eca-accordion-search eca-search-align-' . esc_attr( $align ) . '">';
					$output .= $searchIcon;
					$output .= '<input type="text" class="eca-accordion-search-input" placeholder="' . esc_attr( $accSearchPlaceholder ) . '" />';
					$output .= '</div>';
			}
			foreach ( $settings['accordionTabs'] as $index => $item ) {
				++$index;
				$parent_active = $active = '';
				if ( $settings['accActive'] == $index ) {
					$parent_active = 'active';
					$active        = 'active-accordion';
				}

				$tab_title_id   = 'elementor-tab-title-' . $id_int . $index;
				$tab_content_id = 'elementor-tab-content-' . $id_int . $index;

				$tabTitleKey = $this->get_repeater_setting_key( 'tab_title', 'tabs', $index - 1 );
				$this->add_render_attribute(
					$tabTitleKey,
					array(
						'id'            => $tab_title_id,
						'class'         => array( 'elementor-tab-title', 'eca-accordion-header', $active, $settings['titleAlign'] ),
						'tabindex'      => $id_int . $index,
						'data-tab'      => $index,
						'role'          => 'tab',
						'aria-controls' => $tab_content_id,
					)
				);

					$tabContentKey = $this->get_repeater_setting_key( 'tab_content', 'tabs', $index - 1 );

					$this->add_render_attribute(
						$tabContentKey,
						array(
							'id'              => $tab_content_id,
							'class'           => array( 'elementor-tab-content', 'elementor-clearfix', 'eca-accordion-content', $active ),
							'data-tab'        => $index,
							'role'            => 'tabpanel',
							'aria-labelledby' => $tab_title_id,
						)
					);

					$this->add_inline_editing_attributes( $tabContentKey, 'advanced' );

					$toggle_icon = '';

					$dataAttrs = '';
				if ( ! empty( $accSearch ) && $accSearch === 'yes' ) {
					$dataAttrs .= ' data-title="' . esc_attr( strtolower( $item['accTitle'] ) ) . '"';
					if ( $item['accContentType'] == 'content' && ! empty( $item['accContent'] ) ) {
							$dataAttrs .= ' data-content="' . esc_attr( strtolower( wp_strip_all_tags( $item['accContent'] ) ) ) . '"';
					}
				}
					$output .= '<div class="eca-accordion-item ' . esc_attr( $parent_active ) . '" ' . $dataAttrs . '>';
					// Title
					$output .= '<' . \EcafeHelper::check_and_validate_html_tag( $settings['titleTag'] ) . ' ' . $this->get_render_attribute_string( $tabTitleKey ) . '>';

				if ( $settings['openCloseIcon'] == 'yes' ) {
						$icons = '';
					if ( ! empty( $settings['openIcon'] ) ) {
						ob_start();
						\Elementor\Icons_Manager::render_icon( $settings['openIcon'], array( 'aria-hidden' => 'true' ) );
						$icons = ob_get_contents();
						ob_end_clean();
					}
						$icons_active = '';
					if ( ! empty( $settings['closeIcon'] ) ) {
						ob_start();
						\Elementor\Icons_Manager::render_icon( $settings['closeIcon'], array( 'aria-hidden' => 'true' ) );
						$icons_active = ob_get_contents();
						ob_end_clean();
					}

					if ( ! empty( $icons ) && ! empty( $icons_active ) ) {
						$toggle_icon      = '<span class="elementor-accordion-icon elementor-accordion-icon-' . esc_attr( $settings['iconAlign'] ) . '" aria-hidden="true">';
							$toggle_icon .= '<span class="elementor-accordion-icon-closed">' . $icons . '</span>';
							$toggle_icon .= '<span class="elementor-accordion-icon-opened">' . $icons_active . '</span>';

						$toggle_icon .= '</span>';
					}
				}
				if ( ! empty( $settings['iconAlign'] ) && $settings['iconAlign'] == 'left' ) {
					$output .= $toggle_icon;
				}

							$output .= '<span class="eca-accordion-header-in">';
				if ( ! empty( $item['iconFontawesome'] ) ) {
					ob_start();
					\Elementor\Icons_Manager::render_icon( $item['iconFontawesome'], array( 'aria-hidden' => 'true' ) );
					$icons_loop = ob_get_contents();
					ob_end_clean();

					if ( ! empty( $icons_loop ) ) {
						$output .= '<span class="accordion-icon-prefix"><span class="eca-icon-accordion">' . $icons_loop . '</span></span>';
					}
				}
							$output .= wp_kses_post( $item['accTitle'] ) . '</span>';
				if ( ! empty( $settings['iconAlign'] ) && $settings['iconAlign'] == 'right' ) {
					$output .= $toggle_icon;
				}
						$output .= '</' . \EcafeHelper::check_and_validate_html_tag( $settings['titleTag'] ) . '>';

						// Content/Template
				if ( ( $item['accContentType'] == 'content' && ! empty( $item['accContent'] ) ) || ( $item['accContentType'] == 'page_template' && ! empty( $item['accContentTemplate'] ) ) ) {
					$output .= '<div ' . $this->get_render_attribute_string( $tabContentKey ) . '>';

					if ( $item['accContentType'] == 'content' && ! empty( $item['accContent'] ) ) {
						$output .= '<div class="eca-content-editor norm-content">' . $this->parse_text_editor( wp_kses_post( $item['accContent'] ) ) . '</div>';
					}

					if ( \Elementor\Plugin::$instance->editor->is_edit_mode() && $item['accContentType'] == 'page_template' && ! empty( $item['accContentTemplate'] ) ) {
						if ( ! empty( $item['backendVisible'] ) && $item['backendVisible'] == 'yes' ) {
							if ( 'publish' !== get_post_status( $item['accContentTemplate'] ) ) {
								$output .= '<div class="eca-content-editor">' . esc_html__( 'Template Not Yet Published.', 'essential-classy-addons-for-elementor' ) . '</div>';
							} else {
								$output .= '<div class="eca-content-editor">' . \Elementor\Plugin::$instance->frontend->get_builder_content_for_display( $item['accContentTemplate'] ) . '</div>';
							}
						} else {
									$get_template_name = '';
									$get_template_id   = $item['accContentTemplate'];

							if ( ! empty( $EleTemplates ) && ! empty( $get_template_id ) ) {
								foreach ( $EleTemplates as $value ) {
									if ( $value['template_id'] == $get_template_id ) {
										$get_template_name = $value['title'];
									}
								}
							}
									$output .= '<div class="eca-preview-notice"><div class="eca-preview-notice-heading">' . esc_html__( 'Selected Template :', 'essential-classy-addons-for-elementor' ) . ' <b>"' . esc_html( $get_template_name ) . '"</b></div><div class="eca-preview-notice-desc"><b>' . esc_html__( 'Note :', 'essential-classy-addons-for-elementor' ) . '</b> ' . esc_html__( 'Visibility disable in the backend. You can manage from Option.', 'essential-classy-addons-for-elementor' ) . '</div></div>';
						}
					} elseif ( $item['accContentType'] == 'page_template' && ! empty( $item['accContentTemplate'] ) ) {
						if ( 'publish' !== get_post_status( $item['accContentTemplate'] ) ) {
							$output .= '<div class="eca-content-editor">' . esc_html__( 'Template Not Yet Published.', 'essential-classy-addons-for-elementor' ) . '</div>';
						} else {
							$output .= '<div class="eca-content-editor">' . \Elementor\Plugin::$instance->frontend->get_builder_content_for_display( $item['accContentTemplate'] ) . '</div>';
						}
					}
							$output .= '</div>';
				}

						$output .= '</div>';
			}
		}
		$output .= '</div>';

		echo wp_kses_normalize_entities( $output );
	}
}
