GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/parhudrw/www/wp-content/plugins/around-elementor/modules/pricing/widgets/pricing.php
<?php
namespace AroundElementor\Modules\Pricing\Widgets;

use Elementor\Controls_Manager;
use Elementor\Core\Schemes;
//use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Icons_Manager;
use Elementor\Repeater;
use AroundElementor\Modules\Pricing\Skins;
use AroundElementor\Base\Base_Widget;

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

class Pricing extends Base_Widget {
	
	protected function register_skins() {
		$this->add_skin( new Skins\Skin_Horizontal( $this ) );
		$this->add_skin( new Skins\Skin_Featured( $this ) );
	}

	/**
	 * Get widget name.
	 *
	 * Retrieve button widget name.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'ar-pricing';
	}

	/**
	 * Get widget title.
	 *
	 * Retrieve button widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return esc_html__( 'Pricing', 'around-elementor' );
	}

	/**
	 * Get widget icon.
	 *
	 * Retrieve button widget icon.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'eicon-price-table';
	}

	/**
	 * Get widget keywords.
	 *
	 * Retrieve the list of keywords the widget belongs to.
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @return array Widget keywords.
	 */
	public function get_keywords() {
		return [ 'pricing', 'table' ];
	}

	protected function register_controls() {

		// Content Tab
		$this->pricing_table_general_controls_content_tab();

		$this->pricing_table_skins_add_controls();

		$this->pricing_table_heading_controls_content_tab();
		$this->pricing_table_price_controls_content_tab();
		$this->pricing_table_features_controls_content_tab();
		$this->pricing_table_button_controls_content_tab();

		// Style Tab

		$this->pricing_table_heading_controls_style_tab();
		$this->pricing_table_price_controls_style_tab();
		$this->pricing_table_features_controls_style_tab();
		$this->pricing_table_button_controls_style_tab();
	}

	public function pricing_table_skins_add_controls() {

		// Heading Content Tab Start
		$this->start_controls_section(
			'skin_header',
			[
				'label'      => esc_html__( 'Heading', 'around-elementor' ),
				'condition'  => [
					'_skin'  => 'featured'
				],

			]
		);

		$this->add_control(
			'skin_featured_heading',
			[
				'label'     => esc_html__( 'Heading', 'around-elementor' ),
				'type'      => Controls_Manager::TEXT,
				'default'   => esc_html__( 'Premium', 'around-elementor' ),
			]
		);

		$this->add_control(
			'skin_featured_heading_tag',
			[
				'label'    => esc_html__( 'Heading HTML Tag', 'around-elementor' ),
				'type'     => Controls_Manager::SELECT,
				'options'  => [
					'h2'   => 'H2',
					'h3'   => 'H3',
					'h4'   => 'H4',
					'h5'   => 'H5',
					'h6'   => 'H6',
					'span' => 'SPAN',
				],
				'default'  => 'h3',
			]
		);


		$this->add_control(
			'skin_featured_heading_background_color',
			[
				'label'   => esc_html__( 'Heading Background Color', 'around-elementor' ),
				'type'    => Controls_Manager::SELECT,
				'options' => [
					'primary'   => 'Primary',
					'secondary' => 'Secondary',
					'success'   => 'Success',
					'danger'    => 'Danger',
					'warning'   => 'Warning',
					'info'      => 'Info',
					'light'     => 'Light',
					'dark'      => 'Dark',
					'gradient'  => 'Gradient'
				],
				'default'       => 'gradient',
			]
		);

		// Heading Content Tab End
		$this->end_controls_section();


		$this->start_controls_section(
			'skin_section_title',
			[
				'label'       => esc_html__( 'Title', 'around-elementor' ),
				'condition'   => [
					'_skin'   => 'horizontal'
				],
			]
		);
	

		$this->add_control(
			'skin_title',
			[
				'label'     => esc_html__( 'Title', 'around-elementor' ),
				'type'      => Controls_Manager::TEXT,
				'default'   => esc_html__( 'Free', 'around-elementor' ),
			]
		);

		$this->add_control(
			'skin_title_tag',
			[
				'label'    => esc_html__( 'Title HTML Tag', 'around-elementor' ),
				'type'     => Controls_Manager::SELECT,
				'options'  => [
					'h2'   => 'H2',
					'h3'   => 'H3',
					'h4'   => 'H4',
					'h5'   => 'H5',
					'h6'   => 'H6',
					'span' => 'SPAN',
				],
				'default'  => 'h3',
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'skin_section_title_style',
			[
				'label'       => esc_html__( 'Title', 'around-elementor' ),
				'tab'         => Controls_Manager::TAB_STYLE,
				'show_label'  => false,
				'condition'   => [
					'_skin'   => 'horizontal',
				],
			]
		);

		$this->add_control(
			'skin_title_color',
			[
				'label'      => esc_html__( 'Color', 'around-elementor' ),
				'type'       => Controls_Manager::COLOR,
				'selectors'  => [
					'{{WRAPPER}} .ar-elementor-price-table-skin__title' => 'color: {{VALUE}}',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'      => 'skin_title_typography',
				'selector'  => '{{WRAPPER}} .ar-elementor-price-table-skin__title',
				'scheme'    => Schemes\Typography::TYPOGRAPHY_1,
			]
		);

		$this->add_responsive_control(
			'skin_title_width',
			[
				'label' => __( 'Max Width', 'around-elementor' ),
				'type' => Controls_Manager::SLIDER,
				'range' => [
					'%' => [
						'min' => 10,
						'max' => 100,
					],
					'rem' => [
						'min' => 10,
						'max' => 600,
					],
				],
				'default' => [
					'size' => 15,
					'unit' => 'rem',
				],
				'tablet_default' => [
					'size' => '',
					'unit' => '%',
				],
				'mobile_default' => [
					'size' => 100,
					'unit' => '%',
				],
				'size_units' => [ '%', 'rem' ],
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__horizontal .ar-elementor-price-table__title' => 'max-width: {{SIZE}}{{UNIT}};',
				],
				
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'skin_section_description',
			[
				'label'     => esc_html__( 'Description', 'around-elementor' ),
				'condition' => [
					'_skin' => 'horizontal',
				],
			]
		);

		$this->add_control(
			'skin_description',
			[
				'label'    => esc_html__( 'Description', 'around-elementor' ),
				'type'     => Controls_Manager::TEXTAREA,
				'rows'     => 10,
				'default'  => esc_html__( 'Find aute irure dolor in reprehenderit in volatek', 'around-elementor' ),
				'placeholder' => esc_html__( 'Type your description here', 'around-elementor' ),
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'skin_section_description_style',
			[
				'label'      => esc_html__( 'Description', 'around-elementor' ),
				'tab'        => Controls_Manager::TAB_STYLE,
				'show_label' => false,
				'condition'  => [
					'_skin'  => 'horizontal',
				],
			]
		);

		$this->add_control(
			'skin_description_color',
			[
				'label'     => esc_html__( 'Color', 'around-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table-skin__description' => 'color: {{VALUE}}',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'     => 'skin_description_typography',
				'selector' => '{{WRAPPER}} .ar-elementor-price-table-skin__description',
				'scheme'   => Schemes\Typography::TYPOGRAPHY_1,
			]
		);

		$this->add_control(
            'description_css_class', [
                'label'   => esc_html__( 'Description CSS Class', 'around-elementor' ),
                'type'    => Controls_Manager::TEXT,
                'title'   => esc_html__( 'Add your custom class for card description. e.g: font-size-xs', 'around-elementor' ),
                'default' => 'font-size-xs'


            ]
        );

        $this->add_responsive_control(
			'skin_description_width',
			[
				'label' => __( 'Max Width', 'around-elementor' ),
				'type' => Controls_Manager::SLIDER,
				'range' => [
					'%' => [
						'min' => 10,
						'max' => 100,
					],
					'rem' => [
						'min' => 10,
						'max' => 600,
					],
				],
				'default' => [
					'size' => 20,
					'unit' => 'rem',
				],
				'tablet_default' => [
					'size' => '',
					'unit' => '%',
				],
				'mobile_default' => [
					'size' => 100,
					'unit' => '%',
				],
				'size_units' => [ '%', 'rem' ],
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__horizontal .ar-elementor-price-table__price' => 'max-width: {{SIZE}}{{UNIT}};',
				],
				
			]
		);

		$this->end_controls_section();
		
	}

	public function pricing_table_general_controls_content_tab() {

		// General Content Tab Start
		$this->start_controls_section(
			'section_general',
			[
				'label' => esc_html__( 'General', 'around-elementor' ),
			]
		);


		$this->add_control(
			'show_pricing_table_border',
			[
				'label'              => esc_html__( 'Show Border ?', 'around-elementor' ),
				'type'               => Controls_Manager::SWITCHER,
				'default'            => 'yes',
				'description'        => esc_html__( 'Enable to display border.', 'around-elementor' ),
				'frontend_available' => true,
				'condition'          => [
					'_skin'          => '',
				],
			]
		);


		$this->add_control(
			'show_pricing_table_box_shadow',
			[
				'label'              => esc_html__( 'Show Box Shadow ?', 'around-elementor' ),
				'type'               => Controls_Manager::SWITCHER,
				'default'            => 'no',
				'description'        => esc_html__( 'Enable to display box shadow.', 'around-elementor' ),
				'frontend_available' => true,
				'condition'          => [
					'_skin'          => '',
				],
			]
		);


		$this->add_control(
			'show_price',
			[
				'label'              => esc_html__( 'Show Price ?', 'around-elementor' ),
				'type'               => Controls_Manager::SWITCHER,
				'default'            => 'yes',
				'description'        => esc_html__( 'Enable to display price.', 'around-elementor' ),
				'frontend_available' => true,
			]

		);

		$this->add_control(
			'show_features',
			[
				'label'              => esc_html__( 'Show Features ?', 'around-elementor' ),
				'type'               => Controls_Manager::SWITCHER,
				'default'            => 'yes',
				'description'        => esc_html__( 'Enable to display features.', 'around-elementor' ),
				'frontend_available' => true,

			]
		);

		$this->add_control(
			'show_description',
			[
				'label'              => esc_html__( 'Show Description ?', 'around-elementor' ),
				'type'               => Controls_Manager::SWITCHER,
				'default'            => 'yes',
				'description'        => esc_html__( 'Enable to display description.', 'around-elementor' ),
				'frontend_available' => true,
				'condition'          => [ '_skin' => 'horizontal' ],
			]
		);

		$this->add_control(
			'show_button',
			[
				'label'             => esc_html__( 'Show Button ?', 'around-elementor' ),
				'type'              => Controls_Manager::SWITCHER,
				'default'           => 'yes',
				'description'       => esc_html__( 'Enable to display button.', 'around-elementor' ),
				'frontend_available'=> true,
				'condition'         => [
					'_skin!'        => 'horizontal',
				],
			]
		);


		// General Content Tab End
		$this->end_controls_section();
	}

	public function pricing_table_heading_controls_content_tab() {

		// Heading Content Tab Start
		$this->start_controls_section(
			'section_header',
			[
				'label'           => esc_html__( 'Heading', 'around-elementor' ),
				'condition'       => [
					'_skin'       => '',
				],
			]
		);

		$this->add_control(
			'heading',
			[
				'label'          => esc_html__( 'Heading', 'around-elementor' ),
				'type'           => Controls_Manager::TEXT,
				'default'        => esc_html__( 'Free', 'around-elementor' ),
			]
		);

		$this->add_control(
			'heading_tag',
			[
				'label'         => esc_html__( 'Heading HTML Tag', 'around-elementor' ),
				'type'          => Controls_Manager::SELECT,
				'options'       => [
					'h2'   => 'H2',
					'h3'   => 'H3',
					'h4'   => 'H4',
					'h5'   => 'H5',
					'h6'   => 'H6',
					'span' => 'SPAN',
				],
				'default'  => 'h3',
			]
		);


		$this->add_control(
			'heading_background_color',
			[
				'label'           => esc_html__( 'Heading Background Color', 'around-elementor' ),
				'type'            => Controls_Manager::SELECT,
				'options'         => [
					'primary'   => 'Primary',
					'secondary' => 'Secondary',
					'success'   => 'Success',
					'danger'    => 'Danger',
					'warning'   => 'Warning',
					'info'      => 'Info',
					'light'     => 'Light',
					'dark'      => 'Dark',
					'gradient'  => 'Gradient'
				],
				'default'       => 'secondary',
			]
		);

		// Heading Content Tab End
		$this->end_controls_section();
	}

	public function pricing_table_price_controls_content_tab() {

		// Pricing Content Tab Start
		$this->start_controls_section(
			'section_pricing',
			[
				'label'      => esc_html__( 'Pricing', 'around-elementor' ),
				'condition'  => [ 
					'show_price' => 'yes',
				],
			]
		);

		$this->add_control(
			'currency_symbol',
			[
				'label'               => esc_html__( 'Currency Symbol', 'around-elementor' ),
				'type'                => Controls_Manager::SELECT,
				'options'             => [
					''                => esc_html__( 'None', 'around-elementor' ),
					'dollar'       => '&#36; ' . _x( 'Dollar', 'Currency Symbol', 'around-elementor' ),
					'euro'         => '&#128; ' . _x( 'Euro', 'Currency Symbol', 'around-elementor' ),
					'baht'         => '&#3647; ' . _x( 'Baht', 'Currency Symbol', 'around-elementor' ),
					'franc'        => '&#8355; ' . _x( 'Franc', 'Currency Symbol', 'around-elementor' ),
					'guilder'      => '&fnof; ' . _x( 'Guilder', 'Currency Symbol', 'around-elementor' ),
					'krona'        => 'kr ' . _x( 'Krona', 'Currency Symbol', 'around-elementor' ),
					'lira'         => '&#8356; ' . _x( 'Lira', 'Currency Symbol', 'around-elementor' ),
					'peseta'       => '&#8359 ' . _x( 'Peseta', 'Currency Symbol', 'around-elementor' ),
					'peso'         => '&#8369; ' . _x( 'Peso', 'Currency Symbol', 'around-elementor' ),
					'pound'        => '&#163; ' . _x( 'Pound Sterling', 'Currency Symbol', 'around-elementor' ),
					'real'         => 'R$ ' . _x( 'Real', 'Currency Symbol', 'around-elementor' ),
					'ruble'        => '&#8381; ' . _x( 'Ruble', 'Currency Symbol', 'around-elementor' ),
					'rupee'        => '&#8360; ' . _x( 'Rupee', 'Currency Symbol', 'around-elementor' ),
					'indian_rupee' => '&#8377; ' . _x( 'Rupee (Indian)', 'Currency Symbol', 'around-elementor' ),
					'shekel'       => '&#8362; ' . _x( 'Shekel', 'Currency Symbol', 'around-elementor' ),
					'yen'          => '&#165; ' . _x( 'Yen/Yuan', 'Currency Symbol', 'around-elementor' ),
					'won'          => '&#8361; ' . _x( 'Won', 'Currency Symbol', 'around-elementor' ),
					'custom'       => esc_html__( 'Custom', 'around-elementor' ),
				],
				'default'          => 'dollar',
			]
		);

		$this->add_control(
			'currency_symbol_custom',
			[
				'label'               => esc_html__( 'Custom Symbol', 'around-elementor' ),
				'type'                => Controls_Manager::TEXT,
				'condition'           => [
					'currency_symbol' => 'custom',
				],
			]
		);

		$this->add_control(
			'price',
			[
				'label'               => esc_html__( 'Price', 'around-elementor' ),
				'type'                => Controls_Manager::TEXT,
				'default'             => '0',
				'dynamic'             => [
					'active'          => true,
				],
			]
		);

		$this->add_control(
			'new_price',
			[
				'label'              => esc_html__( 'New Price', 'around-elementor' ),
				'type'               => Controls_Manager::TEXT,
				'description'        => esc_html__( 'This field is used for price switcher', 'around-elementor' ),
				'default'            => '0',
				'dynamic'            => [
					'active'         => true,
				],
				
			]
		);


		$this->add_control(
			'currency_format',
			[
				'label'             => esc_html__( 'Currency Format', 'around-elementor' ),
				'type'              => Controls_Manager::SELECT,
				'options'           => [
					''              => '1,234.56 (Default)',
					','             => '1.234,56',
				],
			]
		);


		$this->add_control(
			'price_subtext',
			[
				'label'            => esc_html__( 'Price Subtext', 'around-elementor' ),
				'type'             => Controls_Manager::TEXTAREA,
				'default'          => esc_html__( 'per<br>month', 'around-elementor' ),
			]
		);

		// Pricing Content Tab End
		$this->end_controls_section();
	}

	public function pricing_table_features_controls_content_tab() {

		// Features Content Tab Start
		$this->start_controls_section(
			'section_features',
			[
				'label'             => esc_html__( 'Features', 'around-elementor' ),
				'condition'         => [ 
					'show_features' => 'yes',
					
				],
			]
		);

		$repeater = new Repeater();

		$repeater->add_control(
			'item_text',
			[
				'label'            => esc_html__( 'List Text', 'around-elementor' ),
				'type'             => Controls_Manager::TEXT,
				'default'          => esc_html__( 'List Item', 'around-elementor' ),
			]
		);

		$repeater->add_control(
			'item_text_color',
			[
				'label'           => esc_html__( 'List Text Color', 'around-elementor' ),
				'type'            => Controls_Manager::COLOR,
				'selectors'       => [
					'{{WRAPPER}} {{CURRENT_ITEM}} span'   => 'color: {{VALUE}}',
				],
				'default'         => '#737491'
			]
		);

		$default_icon             = [
			'value'               => 'fe fe-check',
			'library'             => 'fe-regular',
		];

		$repeater->add_control(
			'selected_item_icon',
			[
				'label'            => esc_html__( 'Icon', 'around-elementor' ),
				'type'             => Controls_Manager::ICONS,
				'fa4compatibility' => 'item_icon',
				'default'          => $default_icon,
			]
		);

		$repeater->add_control(
			'item_icon_color',
			[
				'label'           => esc_html__( 'Icon Color', 'around-elementor' ),
				'type'            => Controls_Manager::COLOR,
				'selectors'       => [
					'{{WRAPPER}} {{CURRENT_ITEM}} i'   => 'color: {{VALUE}}',
					'{{WRAPPER}} {{CURRENT_ITEM}} svg' => 'fill: {{VALUE}}',
				],
				'default'         => '#766df4'
			]
		);

		$repeater->add_control(
			'item_icon_size',

			[
				'label'          => esc_html__( 'Icon Size', 'around-elementor' ),
				'type'           => Controls_Manager::SLIDER,
				'size_units'     => [ 'px', '%', 'rem' ],
				'range'          => [
					'px'         => [
						'min'  => 0,
						'max'  => 1000,
						'step' => 5,
					],
					'%'        => [
						'min'  => 0,
						'max'  => 100,
					],
					'rem'      => [
						'min'  => 0.1,
						'max'  => 10,
					],
				],
				'default'     => [
					'unit'    => 'rem',
					'size'    => 1.25,
				],


				'selectors'   => [
					'{{WRAPPER}} {{CURRENT_ITEM}} i' => 'font-size: {{SIZE}}{{UNIT}}',

				],
				
			]
		);



		$this->add_control(
			'features_list',
			[
				'type'          => Controls_Manager::REPEATER,
				'fields'        => $repeater->get_controls(),
				'default'       => [
					[
						'item_text'          => esc_html__( '20 millions tracks', 'around-elementor' ),
						'selected_item_icon' => $default_icon,
					],
					[
						'item_text'          => esc_html__( 'Shuffle play', 'around-elementor' ),
						'selected_item_icon' => $default_icon,
					],
					[
						'item_text'          => esc_html__( 'No ads', 'around-elementor' ),
						'selected_item_icon' => $default_icon,
					],
					[
						'item_text'          => esc_html__( 'Get unlimited skips', 'around-elementor' ),
						'selected_item_icon' => $default_icon,
					],
					[
						'item_text'          => esc_html__( 'Offline mode', 'around-elementor' ),
						'selected_item_icon' => $default_icon,
					],
					[
						'item_text'          => esc_html__( '7 profiles', 'around-elementor' ),
						'selected_item_icon' => $default_icon,
					],
				],
				'title_field'                => '{{{ item_text }}}',
			]
		);

		// Features Content Tab End
		$this->end_controls_section();
	}

	public function pricing_table_button_controls_content_tab() {


		// Button Content Tab Start
		$this->start_controls_section(
			'section_button',
			[
				'label'                    => esc_html__( 'Button', 'around-elementor' ),
				'condition'                => [
					'show_button'          => 'yes',
					'_skin!'               => 'horizontal',
				],
			]
		);

		$this->add_control(
			'button_text',
			[
				'label'                    => esc_html__( 'Button Text', 'around-elementor' ),
				'type'                     => Controls_Manager::TEXT,
				'default'                  => esc_html__( 'Get started', 'around-elementor' ),
				'placeholder'              => esc_html__( 'Click here', 'around-elementor' ),
			]
		);

		$this->add_control(
			'link',
			[
				'label'                   => esc_html__( 'Link', 'around-elementor' ),
				'type'                    => Controls_Manager::URL,
				'dynamic'                 => [
					'active'              => true,
				],
				'placeholder'             => esc_html__( 'https://your-link.com', 'around-elementor' ),
				'default'                 => [
					'url'                 => '#',
				],
			]
		);

		$this->add_control(
            'button_variant',
            [
                'label'                => esc_html__( 'Variant', 'around-elementor' ),
                'type'                 => Controls_Manager::SELECT,
                'default'              => 'outline',
                'options'              => [
                    ''                 => esc_html__( 'Default', 'around-elementor' ),
                    'outline'          => esc_html__( 'Outline', 'around-elementor' ),
                    'translucent'      => esc_html__( 'Translucent', 'around-elementor' ),
                ]
            ],
            [
                'position'            => [
                    'of'              => 'button_type'
                ]
            ]
        );

		$this->add_control(
			'button_type',
			[
				'label'              => esc_html__( 'Type', 'around-elementor' ),
				'type'               => Controls_Manager::SELECT,
				'default'            => 'primary',
				'options'            => [
					'primary'     => esc_html__( 'Primary', 'around-elementor' ),
                    'secondary'   => esc_html__( 'Secondary', 'around-elementor' ),
                    'success'     => esc_html__( 'Success', 'around-elementor' ),
                    'danger'      => esc_html__( 'Danger', 'around-elementor' ),
                    'warning'     => esc_html__( 'Warning', 'around-elementor' ),
                    'info'        => esc_html__( 'Info', 'around-elementor' ),
                    'dark'        => esc_html__( 'Dark', 'around-elementor' ),
                    'link'        => esc_html__( 'Link', 'around-elementor' ),
                    'gradient'    => esc_html__( 'Gradient', 'around-elementor' ),

				],
			]
		);

		$this->add_control(
			'button_size',
			[
				'label'          => esc_html__( 'Size', 'around-elementor' ),
				'type'           => Controls_Manager::SELECT,
				'options'        => [
					'sm'    => esc_html__( 'Small', 'around-elementor' ),
					''      => esc_html__( 'Base', 'around-elementor' ),
					'lg'    => esc_html__( 'Large', 'around-elementor' ),
					'block' => esc_html__( 'Block', 'around-elementor' ),
				],
				'style_transfer' => true,
				'default'        => '',
			]
		);


		$this->add_control(
			'button_selected_icon',
			[
				'label'            => esc_html__( 'Icon', 'around-elementor' ),
				'type'             => Controls_Manager::ICONS,
				'fa4compatibility' => 'button_icon',
			]
		);

		$this->add_control(
			'button_css_id',
			[
				'label'           => esc_html__( 'Button ID', 'around-elementor' ),
				'type'            => Controls_Manager::TEXT,
				'dynamic'         => [
					'active'      => true,
				],
				'default'         => '',
				'title'           => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'around-elementor' ),
				'description'     => esc_html__( 'Please make sure the ID is unique and not used elsewhere on the page this form is displayed. This field allows <code>A-z 0-9</code> & underscore chars without spaces.', 'around-elementor' ),
				'separator'       => 'before',
			]
		);

		// Button Content Tab End
		$this->end_controls_section();
	}


	public function pricing_table_heading_controls_style_tab() {

		// Heading Style Tab Start
		$this->start_controls_section(
			'section_header_style',
			[
				'label'         => esc_html__( 'Heading', 'around-elementor' ),
				'tab'           => Controls_Manager::TAB_STYLE,
				'show_label'    => false,
                'condition'     => [
					'_skin'     => ['','featured' ]
				],
			]
		);

		$this->add_responsive_control(
			'header_padding',
			[
				'label'         => esc_html__( 'Padding', 'around-elementor' ),
				'type'          => Controls_Manager::DIMENSIONS,
				'size_units'    => [ 'px', '%', 'em' ],
				'selectors'     => [
					'{{WRAPPER}} .ar-elementor-price-table__heading-container,
					{{WRAPPER}} .featured-card .ar-elementor-price-table__heading-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],

			]
		);

		$this->add_control(
			'heading_color',
			[
				'label'        => esc_html__( 'Color', 'around-elementor' ),
				'type'         => Controls_Manager::COLOR,
				'selectors'    => [
					'{{WRAPPER}} .ar-elementor-price-table__heading' => 'color: {{VALUE}}',
				],
				'default'      => '#737491',
				'condition'    => [
					'_skin'    => '',
				],
			]
		);

		$this->add_control(
			'skin_featured_heading_color',
			[
				'label'       => esc_html__( 'Color', 'around-elementor' ),
				'type'        => Controls_Manager::COLOR,
				'selectors'   => [
					'{{WRAPPER}} .featured-card .ar-elementor-price-table__heading' => 'color: {{VALUE}}',
				],
				'default'     => '#ffffff',
				'condition'   => [
					'_skin'   => 'featured',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'        => 'heading_typography',
				'selector'    => '{{WRAPPER}} .ar-elementor-price-table__heading,
				 {{WRAPPER}} .featured-card .ar-elementor-price-table__heading',
				'scheme'      => Schemes\Typography::TYPOGRAPHY_1,
			]
		);

		$this->add_control(
            'heading_css_class', [
                'label'       => esc_html__( 'Heading CSS Class', 'around-elementor' ),
                'type'        => Controls_Manager::TEXT,
                'title'       => esc_html__( 'Add your custom class for featured card. e.g: card-active', 'around-elementor' ),
                'default'     => 'py-5 px-grid-gutter'


            ]
        );


		// Heading Style Tab End
		$this->end_controls_section();
	}

	public function pricing_table_price_controls_style_tab() {

		// Pricing Style Tab Start
		$this->start_controls_section(
			'section_pricing_element_style',
			[
				'label'          => esc_html__( 'Pricing', 'around-elementor' ),
				'tab'            => Controls_Manager::TAB_STYLE,
				'show_label'     => false,
				'condition'      => [ 
					'show_price' => 'yes' ,
				],
			]
		);

		$this->add_control(
			'price_alignment',
			[
				'label'          => esc_html__( 'Price Alignment', 'around-elementor' ),
				'type'           => Controls_Manager::CHOOSE,
				'options'        => [
					'flex-start' => [
						'title'     => esc_html__( 'Left', 'around-elementor' ),
						'icon'      => 'eicon-text-align-left',
					],
					'center'     => [
						'title'     => esc_html__( 'Center', 'around-elementor' ),
						'icon'      => 'eicon-text-align-center',
					],
					'flex-end'   => [
						'title'     => esc_html__( 'Right', 'around-elementor' ),
						'icon'      => 'eicon-text-align-right',
					],
				],
				'selectors'      => [
					'{{WRAPPER}} .ar-elementor-price-table__price' => 'justify-content: {{VALUE}}',
				],
				'default'        => 'flex-start',
				'condition'      => [ 
					'_skin!'     => 'horizontal',
				],
			]
		);

		$this->add_control(
			'currency_symbol_color',
			[
				'label'          => esc_html__( 'Currency Symbol Color', 'around-elementor' ),
				'type'           => Controls_Manager::COLOR,
				'selectors'      => [
					'{{WRAPPER}} .ar-elementor-price-table__currency' => 'color: {{VALUE}}',
				],
				'default'        => '#9e9fb4',
				'separator'      => 'before',
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'            => 'currency_symbol_typography',
				'selector'        => '{{WRAPPER}} .ar-elementor-price-table__currency',
				'scheme'          => Schemes\Typography::TYPOGRAPHY_1,
 	            'fields_options'  => [
 	            	 'typography' => ['default' => 'yes'],
					'font_weight' => [
						'default' => '400',
					],
					
					'font_size'   => [
						'default' => ['size' => 2, 'unit' => 'rem' ],
					],
				],

			]
		);


		$this->add_control(
			'price_color',
			[
				'label'          => esc_html__( 'Price Color', 'around-elementor' ),
				'type'           => Controls_Manager::COLOR,
				'selectors'      => [
					'{{WRAPPER}} .ar-elementor-price-table__integer-part' => 'color: {{VALUE}}',
				],
				'default'        => '#766df4',
				'separator'      => 'before',
			]
		);


		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'            => 'price_typography',
				'selector'        => '{{WRAPPER}} .ar-elementor-price-table__integer-part',
				'scheme'          => Schemes\Typography::TYPOGRAPHY_1,
				'fields_options'  => [
					'typography'  => ['default' => 'yes'],
					'font_weight' => [
						'default' => '400',
					],
					
					'font_size'   => [
						'default' => ['size' => 4, 'unit' => 'rem' ],
					],

					'line_height' => [
						'default' => ['size' => 76.8, 'unit' => 'px' ]
					],
				],

			]
		);

		$this->add_control(
			'heading_currency_style',
			[
				'label'          => esc_html__( 'Currency Symbol', 'around-elementor' ),
				'type'           => Controls_Manager::HEADING,
				'separator'      => 'before',
				
			]
		);

		$this->add_control(
			'currency_position',
			[
				'label'         => esc_html__( 'Position', 'around-elementor' ),
				'type'          => Controls_Manager::CHOOSE,
				'default'       => 'before',
				'options'       => [
					'before'    => [
						'title'    => esc_html__( 'Before', 'around-elementor' ),
						'icon'     => 'eicon-h-align-left',
					],
					'after'      => [
						'title'     => esc_html__( 'After', 'around-elementor' ),
						'icon'      => 'eicon-h-align-right',
					],
				],
			]
		);

		$this->add_control(
			'currency_vertical_position',
			[
				'label'        => esc_html__( 'Vertical Position', 'around-elementor' ),
				'type'         => Controls_Manager::CHOOSE,
				'options'      => [
					'top'      => [
						'title'   => esc_html__( 'Top', 'around-elementor' ),
						'icon'    => 'eicon-v-align-top',
					],
					'middle'   => [
						'title'   => esc_html__( 'Middle', 'around-elementor' ),
						'icon'    => 'eicon-v-align-middle',
					],
					'bottom'   => [
						'title'   => esc_html__( 'Bottom', 'around-elementor' ),
						'icon'    => 'eicon-v-align-bottom',
					],
				],
				'default'      => 'bottom',
				'selectors_dictionary' => [
					'top'              => 'flex-start',
					'middle'           => 'center',
					'bottom'           => 'flex-end',
				],
				'selectors'     => [
					'{{WRAPPER}} .ar-elementor-price-table__currency' => 'align-self: {{VALUE}}',
				],
				'condition'     => [
					'currency_symbol!' => '',
				],
			]
		);

		$this->add_control(
			'heading_price_subtext_style',
			[
				'label'       => esc_html__( 'Price Subtext', 'around-elementor' ),
				'type'        => Controls_Manager::HEADING,
				'separator'   => 'before',
				'condition'   => [
					'price_subtext!' => '',
				],
			]
		);

		$this->add_control(
			'price_subtext_color',
			[
				'label'      => esc_html__( 'Color', 'around-elementor' ),
				'type'       => Controls_Manager::COLOR,
				'selectors'  => [
					'{{WRAPPER}} .ar-elementor-price-table__subtext' => 'color: {{VALUE}}',
				],
				'condition'  => [
					'price_subtext!' => '',
				],
				'default'    => '#9e9fb4',
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'      => 'price_subtext_typography',
				'selector'  => '{{WRAPPER}} .ar-elementor-price-table__subtext',
				'scheme'    => Schemes\Typography::TYPOGRAPHY_2,
				'condition' => [
					'price_subtext!' => '',
				],
				'fields_options'  => [
					'typography'  => ['default' => 'yes'],
					'font_weight' => [
						'default' => '500',
					],
					
					'font_size'   => [
						'default' => ['size' => 1.125, 'unit' => 'rem' ],
					],

					'line_height' => [
						'default' => ['size' => 23.4, 'unit' => 'px' ]
					],
				],
				
			]
		);

		$this->add_control(
            'pricing_css_class', [
                'label'       => esc_html__( 'Pricing CSS Class', 'around-elementor' ),
                'type'        => Controls_Manager::TEXT,
                'title'       => esc_html__( 'Add your custom class for featured card. e.g: card-active', 'around-elementor' ),
                'default'     => 'display-2 px-1 mr-2'


            ]
        );

		// Pricing Style Tab End
		$this->end_controls_section();
	}

	
	public function pricing_table_features_controls_style_tab() {

		// Features Style Tab Start
		$this->start_controls_section(
			'section_features_list_style',
			[
				'label'      => esc_html__( 'Features', 'around-elementor' ),
				'tab'        => Controls_Manager::TAB_STYLE,
				'show_label' => false,
				'condition'  => [ 
					'show_features' => 'yes',
					//'_skin' => '',
				],
			]
		);

		$this->add_responsive_control(
			'features_list_padding',
			[
				'label'      => esc_html__( 'Padding', 'around-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'selectors'  => [
					'{{WRAPPER}} .ar-elementor-price-table__features-list' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);
		

		// $this->add_control(
		// 	'features_list_color',
		// 	[
		// 		'label'     => esc_html__( 'Color', 'around-elementor' ),
		// 		'type'      => Controls_Manager::COLOR,
		// 		'separator' => 'before',
		// 		'selectors' => [
		// 			'{{WRAPPER}} .ar-elementor-price-table__features-list' => 'color: {{VALUE}}',
		// 		],
		// 	]
		// );

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'     => 'features_list_typography',
				'selector' => '{{WRAPPER}} .ar-elementor-price-table__features-list .ar-list-item',
				'scheme'   => Schemes\Typography::TYPOGRAPHY_3,
			]
		);

		$this->add_control(
			'features_list_alignment',
			[
				'label'   => esc_html__( 'Alignment', 'around-elementor' ),
				'type'    => Controls_Manager::CHOOSE,
				'options' => [
					'flex-start' => [
						'title'  => esc_html__( 'Left', 'around-elementor' ),
						'icon'   => 'eicon-text-align-left',
					],
					'center'    => [
						'title' => esc_html__( 'Center', 'around-elementor' ),
						'icon'  => 'eicon-text-align-center',
					],
					'flex-end'  => [
						'title' => esc_html__( 'Right', 'around-elementor' ),
						'icon'  => 'eicon-text-align-right',
					],
				],
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__features-list .ar-list-item' => 'justify-content: {{VALUE}}',
				],
			]
		);

		$this->add_responsive_control(
			'item_width',
			[
				'label'   => esc_html__( 'Width', 'around-elementor' ),
				'type'    => Controls_Manager::SLIDER,
				'range'   => [
					'%'   => [
						'min' => 25,
						'max' => 100,
					],
				],
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__features-list' => 'margin-left: calc((100% - {{SIZE}}%)/2); margin-right: calc((100% - {{SIZE}}%)/2)',
				],
			]
		);

		// Features Style Tab End
		$this->end_controls_section();
	}

	public function pricing_table_button_controls_style_tab() {

		// Button Style Tab Start
		$this->start_controls_section(
			'section_button_style',
			[
				'label'      => esc_html__( 'Button', 'around-elementor' ),
				'tab'        => Controls_Manager::TAB_STYLE,
				'condition'  => [
					'_skin!' => 'horizontal',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name'     => 'typography',
				'scheme'   => Schemes\Typography::TYPOGRAPHY_4,
				'selector' => '{{WRAPPER}} .ar-elementor-price-table__button',
			]
		);

		 $this->start_controls_tabs( 'tabs_button_style' );

		$this->start_controls_tab(
			'tab_button_normal',
			[
				'label'   => esc_html__( 'Normal', 'around-elementor' ),
			]
		);

		$this->add_control(
			'button_text_color',
			[
				'label'   => esc_html__( 'Text Color', 'around-elementor' ),
				'type'    => Controls_Manager::COLOR,
				'default' => '',
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__button' => 'fill: {{VALUE}}; color: {{VALUE}};',
				],
			]
		);

		$this->add_control(
			'button_background_color',
			[
				'label'   => esc_html__( 'Background Color', 'around-elementor' ),
				'type'    => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__button' => 'background-color: {{VALUE}};',
				],
			]
		);

		$this->end_controls_tab();

		$this->start_controls_tab(
			'tab_button_hover',
			[
				'label' => esc_html__( 'Hover', 'around-elementor' ),
			]
		);

		$this->add_control(
			'button_text_hover_color',
			[
				'label'     => esc_html__( 'Text Color', 'around-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__button:hover, {{WRAPPER}} .ar-elementor-price-table__button:focus' => 'color: {{VALUE}};',
					'{{WRAPPER}} .ar-elementor-price-table__button:hover svg, {{WRAPPER}} .ar-elementor-price-table__button:focus svg' => 'fill: {{VALUE}};',
				],
			]
		);

		$this->add_control(
			'button_background_hover_color',
			[
				'label'     => esc_html__( 'Background Color', 'around-elementor' ),
				'type'      => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} .ar-elementor-price-table__button:hover, {{WRAPPER}} .ar-elementor-price-table__button:focus' => 'background-color: {{VALUE}};',
				],
			]
		);

		$this->add_control(
			'hover_animation',
			[
				'label'   => esc_html__( 'Hover Animation', 'around-elementor' ),
				'type'    => Controls_Manager::HOVER_ANIMATION,
			]
		);

		$this->end_controls_tab();

		$this->end_controls_tabs();

		$this->add_responsive_control(
			'button_padding',
			[
				'label'      => esc_html__( 'Padding', 'around-elementor' ),
				'type'       => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors'  => [
					'{{WRAPPER}} .ar-elementor-price-table__button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
				'separator' => 'before',
			]
		);

		$this->add_control(
			'button_classes',
			[
				'label'     => esc_html__( 'Button CSS Classes', 'around-elementor' ),
				'type'      => Controls_Manager::TEXT,
				'dynamic'   => [
					'active'    => true,
				],
				'title'     => esc_html__( 'Add your custom class WITHOUT the dot. e.g: my-class', 'around-elementor' ),
			]
		);

		// Button Style Tab End
		$this->end_controls_section();
	}

	public function render_currency_symbol( $symbol, $location ) {
		$currency_position = $this->get_settings( 'currency_position' );
		$location_setting = ! empty( $currency_position ) ? $currency_position : 'before';
		if ( ! empty( $symbol ) && $location === $location_setting ) {
			echo '<span class="ar-elementor-price-table__currency h2 font-weight-normal text-muted ar-elementor-currency--' . $location . ' mb-1 mr-2">' . $symbol . '</span>';
		}
	}

	public function get_currency_symbol( $symbol_name ) {
		$symbols = [
			'dollar'    => '&#36;',
			'euro'      => '&#128;',
			'franc'     => '&#8355;',
			'pound'     => '&#163;',
			'ruble'     => '&#8381;',
			'shekel'    => '&#8362;',
			'baht'      => '&#3647;',
			'yen'       => '&#165;',
			'won'       => '&#8361;',
			'guilder'   => '&fnof;',
			'peso'      => '&#8369;',
			'peseta'    => '&#8359',
			'lira'      => '&#8356;',
			'rupee'     => '&#8360;',
			'indian_rupee' => '&#8377;',
			'real'      => 'R$',
			'krona'     => 'kr',
		];

		return isset( $symbols[ $symbol_name ] ) ? $symbols[ $symbol_name ] : '';
	}

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

		if ( ! empty( $settings['currency_symbol'] ) ) {
			if ( 'custom' !== $settings['currency_symbol'] ) {
				$symbol = $this->get_currency_symbol( $settings['currency_symbol'] );
			} else {
				$symbol = $settings['currency_symbol_custom'];
			}
		}

		$currency_format = empty( $settings['currency_format'] ) ? '.' : $settings['currency_format'];
		$price = explode( $currency_format, $settings['price'] );

		$intpart = $price[0];
		
		$this->add_render_attribute( 'button_text', 'class', [
			'ar-elementor-price-table__button',
			'btn',

		] );

		if ( 'outline' === $settings['button_variant'] ) {
            $btn_class = 'btn-outline-' . $settings['button_type'];
        } elseif ( 'translucent' === $settings['button_variant'] ) {
            $btn_class = 'btn-translucent-' . $settings['button_type'];
        } else {
            $btn_class = 'btn-' . $settings['button_type'];
        }
        $this->add_render_attribute( 'button_text', 'class', $btn_class );

		if ( ! empty( $settings['button_size'] ) ) {
			$this->add_render_attribute( 'button_text', 'class', 'btn-' . $settings['button_size'] );
		}

		if ( $settings['hover_animation'] ) {
			$this->add_render_attribute( 'button_text', 'class', 'elementor-animation-' . $settings['hover_animation'] );
		}

		if ( ! empty( $settings['link']['url'] ) ) {
			$this->add_link_attributes( 'button_text', $settings['link'] );
		}

		if ( ! empty( $settings[ 'button_classes' ] ) ) {
			$this->add_render_attribute( 'button_text', 'class', $settings['button_classes'] );
		}


		$this->add_render_attribute( 'heading', 'class', 'ar-elementor-price-table__heading mb-0' );

		$this->add_render_attribute( 'price_subtext', 'class', [ 'ar-elementor-price-table__subtext mb-2' ]);
		$this->add_render_attribute( 'pricing_box_description', 'class', 'ar-elementor-price-table__description' );

		$this->add_inline_editing_attributes( 'heading' );
		$this->add_inline_editing_attributes( 'price_subtext' );
		$this->add_inline_editing_attributes( 'button_text' );
		$this->add_inline_editing_attributes( 'pricing_box_description' );


		$heading_tag = $settings['heading_tag'];
		

		$migration_allowed = Icons_Manager::is_migration_allowed();
		$button_icon_migrated = isset( $settings['__fa4_migrated']['button_selected_icon'] );
		$is_new_button_icon = empty( $settings['button_icon'] ) && $migration_allowed;

		// Pricing Table Header Content
		ob_start();
			?><div class="ar-elementor-price-table__heading-container text-center card-img-top bg-<?php echo esc_attr( $settings[ 'heading_background_color' ] ); ?> <?php echo esc_attr( $settings[ 'heading_css_class' ] ); ?>">
				<<?php echo $heading_tag . ' ' . $this->get_render_attribute_string( 'heading' ); ?>><?php echo $settings['heading'] . '</' . $heading_tag; ?>>
			</div><?php 
		$pricing_table_header_content = ob_get_clean();


		// Pricing Table Price Content
		ob_start();

		if (  '' !== $settings['price'] && $settings[ 'show_price' ] == 'yes' ): ?>
			<div class="ar-elementor-price-table__price d-flex align-items-end py-2 px-4 mb-4">
				
				<?php if ( '' !== $settings['price'] ) : $this->render_currency_symbol( $symbol, 'before' ); endif;?>

				<?php if ( ( ! empty( $intpart ) || 0 <= $intpart ) ) : ?>
					<span class="ar-elementor-price-table__integer-part price cs-price  <?php echo esc_attr( $settings[ 'pricing_css_class' ] ); ?>" data-current-price="<?php echo esc_attr( $settings['price']); ?>" data-new-price="<?php echo esc_attr( $settings['new_price']); ?>"><?php echo $intpart; ?></span>
				<?php endif; ?>

				<?php if ( '' !== $settings['price'] ) : $this->render_currency_symbol( $symbol, 'after' ); endif;?>
					
				<?php if ( '' !== $settings['price']  && ! empty( $settings['price_subtext'] ) ): ?>
					<span <?php echo $this->get_render_attribute_string( 'price_subtext' ); ?>><?php echo wp_kses_post( $settings['price_subtext']); ?></span>
				<?php endif; ?>

			</div>
		<?php endif;
		$pricing_table_price_content = ob_get_clean();

		// Pricing Table Description Content
		ob_start();
			if ( $settings[ 'show_description' ] == 'yes' && ! empty( $settings['pricing_box_description'] ) ): ?>
				<p <?php echo $this->get_render_attribute_string( 'pricing_box_description' ); ?>><?php echo $settings['pricing_box_description']; ?></p>
			<?php endif;
		$pricing_table_desciption_content = ob_get_clean();

		// Pricing Table Features Content
		ob_start();
			if ( ! empty( $settings['features_list'] ) && $settings[ 'show_features' ] == 'yes' ) : ?>
				<ul class="ar-elementor-price-table__features-list list-unstyled py-2 mb-4">
					<?php
					foreach ( $settings['features_list'] as $index => $item ) :
						$repeater_setting_key = $this->get_repeater_setting_key( 'item_text', 'features_list', $index );


						$this->add_inline_editing_attributes( $repeater_setting_key );

						$migrated = isset( $item['__fa4_migrated']['selected_item_icon'] );
						// add old default
						if ( ! isset( $item['item_icon'] ) && ! $migration_allowed ) {
							$item['item_icon'] = 'fe-check';
						}
						$is_new = ! isset( $item['item_icon'] ) && $migration_allowed;
						
						?>
						<li class="ar-list-item elementor-repeater-item-<?php echo $item['_id']; ?> d-flex align-items-center mb-3">
							<?php if ( ! empty( $item['item_icon'] ) || ! empty( $item['selected_item_icon'] ) ) : ?>

								<?php if ( $is_new || $migrated ) : ?>

								<?php Icons_Manager::render_icon( $item['selected_item_icon'], ['aria-hidden' => 'true', 'class' => 'mr-2']);
								else : ?>
									<i class="<?php echo esc_attr( $item['item_icon'] ); ?> mr-2" aria-hidden="true"></i>
								<?php endif; ?>

							<?php endif; ?>
							<?php if ( ! empty( $item['item_text'] ) ) : ?>
								<span <?php echo $this->get_render_attribute_string( $repeater_setting_key ); ?>><?php echo $item['item_text']; ?></span>
							<?php else :
								echo '&nbsp;';
							endif; ?>
						</li>
					<?php endforeach; ?>
				</ul>
			<?php endif;
		$pricing_table_features_content = ob_get_clean();

		// Pricing Table Button Content
		ob_start();
			if ( ! empty( $settings['button_text'] ) && $settings[ 'show_button' ] == 'yes' ) : ?>
				<div class="text-center mb-2">
					<a <?php if ( $settings[ 'button_css_id' ] ): ?>id="<?php echo esc_attr( $settings[ 'button_css_id' ] ); ?>"<?php endif; ?> <?php echo $this->get_render_attribute_string( 'button_text' ); ?>>		
						<?php echo $settings['button_text']; ?>
						<?php if ( ! empty( $settings['button_icon'] ) || ! empty( $settings['button_selected_icon']['value'] ) ) : ?>
							<?php if ( $is_new_button_icon || $button_icon_migrated ) :
								Icons_Manager::render_icon( $settings['button_selected_icon'], [ 'aria-hidden' => 'true', 'class' => 'ml-2' ] );
							else : ?>
								<i class="<?php echo esc_attr( $settings['button_icon'] ); ?> ml-2" aria-hidden="true"></i>
							<?php endif; ?>
						<?php endif; ?>
					</a>
				</div>
			<?php endif;
		$pricing_table_button_content = ob_get_clean();

		?>
		
		<div class="ar-elementor-price-table card w-100<?php echo esc_attr( $settings['show_pricing_table_border'] !== 'yes' ? ' border-0' : '');?><?php echo esc_attr( $settings['show_pricing_table_box_shadow'] == 'yes' ? ' box-shadow' : '');?>">

			<?php 
				if ( $settings['heading'] && ! empty( $settings['heading'] ) ): ?>
				<?php echo wp_kses_post( $pricing_table_header_content ); ?>

			<?php endif; ?>
			<div class="card-body px-grid-gutter py-grid-gutter"><?php
				echo wp_kses_post( $pricing_table_price_content );
				echo wp_kses_post( $pricing_table_desciption_content );
				echo wp_kses_post( $pricing_table_features_content ); 
				echo wp_kses_post( $pricing_table_button_content ); ?>
			</div>
		</div>	
				
		<?php
	}

	/**
	 * Render Price Table widget output in the editor.
	 *
	 * Written as a Backbone JavaScript template and used to generate the live preview.
	 *
	 * @since 2.9.0
	 * @access protected
	 */
	protected function content_template() {
		?>
		<#
			let symbols = {
				dollar: '&#36;',
				euro: '&#128;',
				franc: '&#8355;',
				pound: '&#163;',
				ruble: '&#8381;',
				shekel: '&#8362;',
				baht: '&#3647;',
				yen: '&#165;',
				won: '&#8361;',
				guilder: '&fnof;',
				peso: '&#8369;',
				peseta: '&#8359;',
				lira: '&#8356;',
				rupee: '&#8360;',
				indian_rupee: '&#8377;',
				real: 'R$',
				krona: 'kr'
			};

			let symbol = '',
				iconsHTML = {};
				
			

			if ( settings.currency_symbol ) {
				if ( 'custom' !== settings.currency_symbol ) {
					symbol = symbols[ settings.currency_symbol ] || '';
				} else {
					symbol = settings.currency_symbol_custom;
				}
			}


			let buttonClasses = 'ar-elementor-price-table__button btn';

			
			if ( settings.button_size ) {
				buttonClasses += ' btn-' + settings.button_size;
			}

			
			if ( settings.hover_animation ) {
				buttonClasses += ' elementor-animation-' + settings.hover_animation;
			}

			
			if ( settings.button_classes ) {
				buttonClasses += ' ' + settings.button_classes;
			}

			if ( 'outline' === settings.button_variant ) {
            	buttonClasses = 'btn-outline-' . settings.button_type;
	        } elseif ( 'translucent' === settings.button_variant ) {
	            buttonClasses = 'btn-translucent-' . settings.button_type;
	        } else {
	            buttonClasses = 'btn-' . settings.button_type;
	        }
	        view.addRenderAttribute( 'button_text', 'class', buttonClasses );

			let buttonIconHTML = elementor.helpers.renderIcon( view, settings.button_selected_icon, { 'aria-hidden': true, 'class': 'ml-2' }, 'i' , 'object' );

			let buttonIconMigrated = elementor.helpers.isIconMigrated( settings, 'button_selected_icon' );

			view.addRenderAttribute( 'heading', 'class', 'ar-elementor-price-table__heading' );


			view.addRenderAttribute( 'period', 'class', [ 'ar-elementor-price-table__period', 'ar-elementor-typo-excluded', 'h2', 'align-self-end', 'mb-1' ] );

			view.addRenderAttribute( 'price_subtext', 'class', [ 'ar-elementor-price-table__subtext mb-2' ]);
        	view.addRenderAttribute( 'pricing_box_description', 'class', 'ar-elementor-price-table__description' );


			view.addRenderAttribute( 'button_text', 'class', buttonClasses  );
			

			view.addInlineEditingAttributes( 'heading' );
			view.addInlineEditingAttributes( 'period' );
			view.addInlineEditingAttributes( 'price_subtext' );
			view.addInlineEditingAttributes( 'button_text' );
			view.addInlineEditingAttributes( 'pricing_box_description' );

			let currencyFormat = settings.currency_format || '.';
			let	price = settings.price.split( currencyFormat );
			let	intpart = price[0];
			let	fraction = price[1];
			let	periodElement = '<span ' + view.getRenderAttributeString( "period" ) + '>' + settings.period + '</span>';
		#>
		
		<div class="ar-elementor-price-table card w-100<# settings.show_pricing_table_border !== 'yes' ? ' border-0' : '' #><# settings.show_pricing_table_box_shadow == 'yes' ? ' box-shadow' : '' #>">
			<# if ( settings.heading ) { #>
				<span class="ar-elementor-price-table__heading-container text-center card-img-top bg-<# print( settings.heading_background_color ); #> <# print( settings.heading_css_class ); #>">
					<{{ settings.heading_tag }} {{{ view.getRenderAttributeString( 'heading' ) }}}>{{{ settings.heading }}}</{{ settings.heading_tag }}>
				</span>

			<# } #>
			<div class="card-body px-grid-gutter py-grid-gutter">
				<# if ( intpart && settings.show_price ) { #>
					<div class="ar-elementor-price-table__price d-flex align-items-end py-2 px-4 mb-4">
						
						<# if ( ! _.isEmpty( symbol ) && ( 'before' === settings.currency_position || _.isEmpty( settings.currency_position ) ) ) { #>
							<span class="ar-elementor-price-table__currency ar-elementor-currency--before mb-1 mr-2">{{{ symbol }}}</span>
						<# } #>

						

						<# if ( ( ! _.isEmpty( intpart ) || 0 <= intpart )  ){ #>
							<span class="ar-elementor-price-table__integer-part price cs-price px-1 mr-2" data-current-price="{{ settings.price}}" data-new-price="{{ settings.new_price }}">{{{ intpart }}}</span>

						<# } #>

						<# if ( ! _.isEmpty( symbol ) && 'after' == settings.currency_position ) { #>
						<span class="ar-elementor-price-table__currency ar-elementor-currency--after mb-1 mr-2">{{{ symbol }}}</span>
						<# } #>

						<# if ( settings.period && 'beside' === settings.period_position ) { #>
							{{{ periodElement }}}
						<# } #>
						
						<# if ( settings.price_subtext ) { #>
							{{{ '<span ' + view.getRenderAttributeString( "price_subtext" ) + '>' + settings.price_subtext + '</span>' }}}
						<# } #>
					</div>
				<# } #>

				<# if ( settings.show_description && settings.pricing_box_description ) { #>
					{{{ '<p ' + view.getRenderAttributeString( "pricing_box_description" ) + '>' + settings.pricing_box_description + '</p>' }}}
				<# } #>

				<# if ( settings.features_list && settings.show_features ) { #>
					<ul class="ar-elementor-price-table__features-list list-unstyled py-2 mb-4">
						<# _.each( settings.features_list, function( item, index ) {

							let featureKey = view.getRepeaterSettingKey( 'item_text', 'features_list', index );
							let	migrated = elementor.helpers.isIconMigrated( item, 'selected_item_icon' );

							if ( settings.features_list.length === index + 1 ) {
								view.addRenderAttribute( featureKey, {
									'class': 'mb-0',
								} );
							}

							view.addInlineEditingAttributes( featureKey );
						#>
							<li class="ar-list-item elementor-repeater-item-{{ item._id }} d-flex mb-3">
								<# if ( item.item_icon || item.selected_item_icon ) { #>
									
										<# iconsHTML[ index ] = elementor.helpers.renderIcon( view, item.selected_item_icon, { 'aria-hidden': 'true', 'class': 'mr-2' }, 'i', 'object' );
										if ( ( ! item.item_icon || migrated ) && iconsHTML[ index ] && iconsHTML[ index ].rendered ) { #>
											{{{ iconsHTML[ index ].value }}}
										<# } else { #>
											<i class="{{ item.item_icon }} mr-2" aria-hidden="true"></i>
										<# } #>
									
								<# } #>
								<# if ( ! _.isEmpty( item.item_text.trim() ) ) { #>
									<span {{{ view.getRenderAttributeString( featureKey ) }}}>{{{ item.item_text }}}</span>
								<# } else { #>
									&nbsp;
								<# } #>
							</li>
						<# } ); #>
					</ul>
				<# } #>

				<# if ( settings.button_text && settings.show_button ) { #>
					<div class="text-center mb-2">
						<a id="{{ settings.button_css_id }}" href="#!" {{{ view.getRenderAttributeString( 'button_text' ) }}}>
							{{{ settings.button_text }}}
							<# if ( settings.button_icon || settings.button_selected_icon ) {
								if ( ( buttonIconMigrated || ! settings.button_icon ) && buttonIconHTML.rendered ) { #>
									{{{ buttonIconHTML.value }}}
								<# } else { #>
									<i class="{{ settings.button_icon }} ml-2" aria-hidden="true"></i>
								<# }
							} #>
						</a>
					</div>
				<# } #>
			</div>
		</div>
	
		<?php
	}
}