<?php
namespace EcafeAddons\Widgets;

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Utils;
use Elementor\Group_Control_Typography;
use Elementor\Core\Schemes\Typography;
use Elementor\Scheme_Color;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Text_Shadow;

use EcafeAddons\EcafeElementLoad;

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

class Ecafe_Woocommerce_ordertrack extends Widget_Base {

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

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

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

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

	public function get_keywords() {
		return array( 'woocommerce ordertrack', 'Woocommerce', 'ordertrack', 'order track' );
	}
	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(
			'contentSection',
			array(
				'label' => esc_html__( 'Woocommerce Ordertrack', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			)
		);
		$this->add_control(
			'wotLayout',
			array(
				'label'   => esc_html__( 'Layout', 'essential-classy-addons-for-elementor' ),
				'type'    => Controls_Manager::SELECT,
				'default' => 'default',
				'options' => array(
					'default'     => esc_html__( 'Default', 'essential-classy-addons-for-elementor' ),
					'ecwotcolumn' => esc_html__( 'Column', 'essential-classy-addons-for-elementor' ),
				),
			)
		);
		$this->end_controls_section();

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

		/*style*/
		$this->start_controls_section(
			'wotFormStyling',
			array(
				'label' => esc_html__( 'Order Track Form', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_control(
			'wotFIHeading',
			array(
				'label' => esc_html__( 'Information', 'essential-classy-addons-for-elementor' ),
				'type'  => Controls_Manager::HEADING,
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotFITypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order',
			)
		);
		$this->add_control(
			'wotFIColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order' => 'color: {{VALUE}}',
				),
			)
		);
		$this->add_control(
			'wotFLaHeading',
			array(
				'label'     => esc_html__( 'Label', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotFLaPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'wotFLaMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotFLaTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label',
			)
		);
		$this->add_control(
			'wotFLaColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFLaBg',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFLaBorder',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label',
			)
		);
		$this->add_responsive_control(
			'wotFLaBr',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFLaShadow',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'wotFLaTextShadow',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order label',
			)
		);
		$this->add_control(
			'wotFFHeading',
			array(
				'label'     => esc_html__( 'Field', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotFFPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotFFTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input',
			)
		);
		$this->add_control(
			'wotFFPColor',
			array(
				'label'     => esc_html__( 'Placeholder Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input::placeholder' => 'color: {{VALUE}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabswotFFstyle' );
		$this->start_controls_tab(
			'tabwotFFNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'wotFFColorN',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFFBgN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFFBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input',
			)
		);
		$this->add_responsive_control(
			'wotFFBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFFShadowN',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'wotFFTextShadowN',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabwotFFFocus',
			array(
				'label' => esc_html__( 'Focus', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'wotFFColorF',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input:focus' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFFBgF',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input:focus',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFFBorderF',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input:focus',
			)
		);
		$this->add_responsive_control(
			'wotFFBrF',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFFShadowF',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input:focus',
			)
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			array(
				'name'     => 'wotFFTextShadowF',
				'label'    => esc_html__( 'Text Shadow', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order input:focus',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();

		$this->add_control(
			'wotFBHeading',
			array(
				'label'     => esc_html__( 'Button', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotFBPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotFBTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button',
			)
		);
		$this->start_controls_tabs( 'tabswotFBStyle' );
		$this->start_controls_tab(
			'tabwotFBNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'wotFBColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFBBgN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFBBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button',
			)
		);
		$this->add_responsive_control(
			'wotFBBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFBShadowN',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabwotFBHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'wotFBColorH',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button:hover' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFBBgH',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button:hover',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFBBorderH',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button:hover',
			)
		);
		$this->add_responsive_control(
			'wotFBBrH',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFBShadowH',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order .form-row button:hover',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();

		$this->add_control(
			'wotFBoHeading',
			array(
				'label'     => esc_html__( 'Box', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotFBoPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'wotFBoMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabswotFBoStyle' );
		$this->start_controls_tab(
			'tabwotFBoNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFBoBgN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFBoBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order',
			)
		);
		$this->add_responsive_control(
			'wotFBoBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFBoShadowN',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabwotFBoH',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotFBoBgH',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order:hover',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotFBoBorderH',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order:hover',
			)
		);
		$this->add_responsive_control(
			'wotFBoBrH',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotFBoShadowH',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper form.woocommerce-form-track-order:hover',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();

		$this->start_controls_section(
			'wotInfoStyling',
			array(
				'label' => esc_html__( 'Order Track Info', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotITypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .order-info',
			)
		);
		$this->add_control(
			'wotIColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .order-info' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotIHColor',
			array(
				'label'     => esc_html__( 'Highlight Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .order-info mark' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotIHBColor',
			array(
				'label'     => esc_html__( 'Highlight Background', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .order-info mark' => 'background: {{VALUE}};',
				),
			)
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'wotODStyling',
			array(
				'label' => esc_html__( 'Order Details', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_control(
			'wotODHHeading',
			array(
				'label' => esc_html__( 'Heading', 'essential-classy-addons-for-elementor' ),
				'type'  => Controls_Manager::HEADING,
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotODHTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .woocommerce-order-details__title',
			)
		);
		$this->add_control(
			'wotODHColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .woocommerce-order-details__title' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTLHeading',
			array(
				'label'     => esc_html__( 'Head', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotODTLTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details thead th',
			)
		);
		$this->add_control(
			'wotODTLColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details thead th' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTVHeading',
			array(
				'label'     => esc_html__( 'Body', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotODTVTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tbody td',
			)
		);
		$this->add_control(
			'wotODTVColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tbody td' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODLiVHeading',
			array(
				'label'     => esc_html__( 'Link', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotODLiVTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tbody td a',
			)
		);
		$this->add_control(
			'wotODLiVColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tbody td a' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODLiVHColor',
			array(
				'label'     => esc_html__( 'Hover Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tbody td a:hover' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTFHeading',
			array(
				'label'     => esc_html__( 'Footer', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotODTFTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot th,{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot td',
			)
		);
		$this->add_control(
			'wotODTFColor',
			array(
				'label'     => esc_html__( 'Head Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot th' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTFVColor',
			array(
				'label'     => esc_html__( 'Value Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot td' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTFLHeading',
			array(
				'label'     => esc_html__( 'Totals', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotODTFLTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot tr:last-child th,{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot tr:last-child td',
			)
		);
		$this->add_control(
			'wotODTFLColor',
			array(
				'label'     => esc_html__( 'Head Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot tr:last-child th' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTFLDColor',
			array(
				'label'     => esc_html__( 'Value Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order_details tfoot tr:last-child td' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotODTableVHeading',
			array(
				'label'     => esc_html__( 'Table', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_control(
			'yobdbR',
			array(
				'label'   => esc_html__( 'Remove Default Border', 'essential-classy-addons-for-elementor' ),
				'type'    => Controls_Manager::SWITCHER,
				'default' => 'no',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'      => 'yoBorder',
				'label'     => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector'  => '{{WRAPPER}} .ec-order-track-wrapper.brddsb .woocommerce .order_details th,
				{{WRAPPER}} .ec-order-track-wrapper.brddsb .woocommerce .order_details td',
				'condition' => array(
					'yobdbR' => 'yes',
				),
			)
		);
		$this->add_control(
			'wotODBoxVHeading',
			array(
				'label'     => esc_html__( 'Box', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotODBoxVPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'wotODBoxVMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabswotODBoxVStyle' );
		$this->start_controls_tab(
			'tabwotODBoxVNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotODBoxVBGN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotODBoxVBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details',
			)
		);
		$this->add_responsive_control(
			'wotODBoxVBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotODBoxVShadowN',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabwotODBoxVHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotODBoxVBgH',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details:hover',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotODBoxVBorderH',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details:hover',
			)
		);
		$this->add_responsive_control(
			'wotODBoxVBrH',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotODBoxVShadowH',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details:hover',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();

		$this->start_controls_section(
			'wotOAStyling',
			array(
				'label' => esc_html__( 'Order Again Button', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_responsive_control(
			'wotOAPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotOATypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a',
			)
		);
		$this->start_controls_tabs( 'tabswotOAStyle' );
		$this->start_controls_tab(
			'tabwotOANorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'wotOAColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotOABgN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotOABorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a',
			)
		);
		$this->add_responsive_control(
			'wotOABrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotOAShadowN',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabwotOAHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_control(
			'wotOAColorH',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a:hover' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotOABgH',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a:hover',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotOABorderH',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a:hover',
			)
		);
		$this->add_responsive_control(
			'wotOABrH',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotOAShadowH',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-order-details .order-again a:hover',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();

		$this->start_controls_section(
			'wotBStyling',
			array(
				'label' => esc_html__( 'Billing', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_control(
			'wotBHHeading',
			array(
				'label' => esc_html__( 'Heading', 'essential-classy-addons-for-elementor' ),
				'type'  => Controls_Manager::HEADING,
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotBHTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 .woocommerce-column__title',
			)
		);
		$this->add_control(
			'wotBHColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 .woocommerce-column__title' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotBCHeading',
			array(
				'label'     => esc_html__( 'Content', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotBCPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotBCTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address',
			)
		);
		$this->add_control(
			'wotBCColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wmaRLBg',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wmaRLBorder',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address',
			)
		);
		$this->add_responsive_control(
			'wmaRLBr',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wmaRLShadow',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-1 address',
			)
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'wotSStyling',
			array(
				'label' => esc_html__( 'Shipping', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_control(
			'wotSHHeading',
			array(
				'label' => esc_html__( 'Heading', 'essential-classy-addons-for-elementor' ),
				'type'  => Controls_Manager::HEADING,
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotSHTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 .woocommerce-column__title',
			)
		);
		$this->add_control(
			'wotSHColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 .woocommerce-column__title' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_control(
			'wotSCHeading',
			array(
				'label'     => esc_html__( 'Content', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::HEADING,
				'separator' => 'before',
			)
		);
		$this->add_responsive_control(
			'wotSCPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Typography::get_type(),
			array(
				'name'     => 'wotSCTypo',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address',
			)
		);
		$this->add_control(
			'wotSCColor',
			array(
				'label'     => esc_html__( 'Color', 'essential-classy-addons-for-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address' => 'color: {{VALUE}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wmaSLBg',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wmaSLBorder',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address',
			)
		);
		$this->add_responsive_control(
			'wmaSLBr',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wmaSLShadow',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper .woocommerce-customer-details .col-2 address',
			)
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'wotBoxStyling',
			array(
				'label' => esc_html__( 'Box', 'essential-classy-addons-for-elementor' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			)
		);
		$this->add_responsive_control(
			'wotBoxPadding',
			array(
				'label'      => esc_html__( 'Padding', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_responsive_control(
			'wotBoxMargin',
			array(
				'label'      => esc_html__( 'Margin', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%', 'em' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->start_controls_tabs( 'tabswotBoxStyle' );
		$this->start_controls_tab(
			'tabwotBoxNorm',
			array(
				'label' => esc_html__( 'Normal', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotBoxBGN',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotBoxBorderN',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper',
			)
		);
		$this->add_responsive_control(
			'wotBoxBrN',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotBoxShadowN',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper',
			)
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'tabwotBoxHover',
			array(
				'label' => esc_html__( 'Hover', 'essential-classy-addons-for-elementor' ),
			)
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			array(
				'name'     => 'wotBoxBgH',
				'types'    => array( 'classic', 'gradient' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper:hover',
			)
		);
		$this->add_group_control(
			Group_Control_Border::get_type(),
			array(
				'name'     => 'wotBoxBorderH',
				'label'    => esc_html__( 'Border', 'essential-classy-addons-for-elementor' ),
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper:hover',
			)
		);
		$this->add_responsive_control(
			'wotBoxBrH',
			array(
				'label'      => esc_html__( 'Border Radius', 'essential-classy-addons-for-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => array( 'px', '%' ),
				'selectors'  => array(
					'{{WRAPPER}} .ec-order-track-wrapper:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				),
			)
		);
		$this->add_group_control(
			Group_Control_Box_Shadow::get_type(),
			array(
				'name'     => 'wotBoxShadowH',
				'selector' => '{{WRAPPER}} .ec-order-track-wrapper:hover',
			)
		);
		$this->end_controls_tab();
		$this->end_controls_tabs();
		$this->end_controls_section();
	}

	private function ecotshortcode() {
		$settings = $this->get_settings();
		$this->add_render_attribute( 'ecotshortcode', 'woocommerce_order_tracking' );
		$ecotshortcode[] = sprintf( '[%s]', $this->get_render_attribute_string( 'ecotshortcode' ) );
		return implode( '', $ecotshortcode );
	}

	protected function render() {
		$settings = $this->get_settings_for_display();
		if ( class_exists( 'woocommerce' ) ) {
			$yobdbcls = '';
			if ( isset( $settings['yobdbR'] ) && $settings['yobdbR'] == 'yes' ) {
				$yobdbcls = ' brddsb';
			}
			$output      = '<div class="ec-order-track-wrapper ' . esc_attr( $settings['wotLayout'] ) . ' ' . esc_attr( $yobdbcls ) . '">';
				$output .= do_shortcode( $this->ecotshortcode() );
			$output     .= '</div>';
			echo $output;
		}
	}
}
