<?php
/**
 * Elementor Progress Bar Widget.
 *
 * Elementor widget that inserts an embbedable content into the page, from any given URL.
 *
 * @since 1.0.5
 */

use \Elementor\Plugin;

class Elementor_Progress_Bar_Widget extends \Elementor\Widget_Base {

	/**
	 * Get widget name.
	 *
	 * Retrieve Progress Bar widget name.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'progress bar';
	}

	/**
	 * Get widget title.
	 *
	 * Retrieve Progress Bar widget title.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return __( 'Progress Bar', 'endless-addons' );
	}

	/**
	 * Get widget icon.
	 *
	 * Retrieve Progress Bar widget icon.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'fa fa-exchange';
	}

	/**
	 * Get widget categories.
	 *
	 * Retrieve the list of categories the Progress Bar widget belongs to.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'endless-elements' ];
	}

	/**
	 * Register Progress Bar widget controls.
	 *
	 * Adds different input fields to allow the user to change and customize the widget settings.
	 *
	 * @since 1.0.5
	 * @access protected
	 */
	protected function register_controls() {

		$this->start_controls_section(
			'default_section',
			[    
				'label' => __( 'Settings', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT
			]
		);

		$this->add_control(
			'show_progress_bar',
			[
				'label' => __( 'Show/Hide Progress Bar Section', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'title' => __( 'Show', 'endless-addons' ),
						'icon' => 'fa fa-check'
					],
					'hide' => [
						'title' => __( 'Hide', 'endless-addons' ),
						'icon' => 'fa fa-close'
					]
				],
				'default' => 'show',
				'toggle' => true
			]
		);

		$this->add_control(
			'select_progress_style',
			[
				'label' => __( 'Select Progress Bar Style', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'input_type' => 'SELECT',
				'options' => [
					'style-01' => __( 'Style 01', 'endless-addons' ),
					'style-02' => __( 'Style 02', 'endless-addons' ),
					'style-03' => __( 'Style 03', 'endless-addons' ),
					'style-04' => __( 'Style 04', 'endless-addons' ),
					'style-05' => __( 'Style 05', 'endless-addons' ),
					'style-06' => __( 'Style 06', 'endless-addons' )
				],
				'default' => 'style-01'
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'progress_section',
			[
				'label' => __( 'Progress Bar Section', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);

		$this->add_control(
			'progress_section_title',
			[
				'label' => __( 'Progress Bar Title', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Title', 'endless-addons' ),
				'default'  => __( 'Design 1', 'endless-addons' )
			]
		);

		$this->add_control(
			'progress_section_desc',
			[
				'label' => __( 'Progress Bar Description', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::WYSIWYG,
				'input_type' => 'WYSIWYG',
				'placeholder' => __( 'Description', 'endless-addons' ),
				'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt dolore magna aliqua. Quis ipsum suspendisse ultrices gravida.', 'endless-addons')
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name' => 'section_background',
				'label' => __( 'Background', 'plugin-domain' ),
				'types' => [ 'classic', 'gradient', 'video' ],
				'selector' => '{{WRAPPER}} .ea-progress-bar-area',
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'progress_bar_content',
			[
				'label' => __( 'Progress Bar Content', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT
			]
		);
		
		$this->add_control(
			'progress_subtitle',
			[
				'label' => __( 'Progress Bar Subtitle', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Subtitle', 'endless-addons' ),
				'default'  => __( 'Experience', 'endless-addons' ),
				'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
			]
		);

		$this->add_control(
			'progress_title',
			[
				'label' => __( 'Progress Bar Title', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Title', 'endless-addons' ),
				'default'  => __( 'All the experiences we have in our work are highlighted', 'endless-addons' ),
				'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
			]
		);

		$this->add_control(
			'ea_title_tag',
			[
				'label' => __( 'Title Tag', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'input_type' => 'SELECT',
				'options' => [
					'h1' => __( 'h1', 'endless-addons' ),
					'h2' => __( 'h2', 'endless-addons' ),
					'h3' => __( 'h3', 'endless-addons' ),
					'h4' => __( 'h4', 'endless-addons' ),
					'h5' => __( 'h5', 'endless-addons' ),
					'h6' => __( 'h6', 'endless-addons' )
				],
				'default' => 'h2',
				'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
			]
		);

		$this->add_control(
            'ea_content_text_type',
            [
                'label' => __('Content Type', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::SELECT,
                'options' => [
                    'content' => __('Content', 'endless-addons'),
                    'template' => __('Saved Templates', 'endless-addons'),
                ],
                'default' => 'content',
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
            ]
        );

		$this->add_control(
			'progress_desc',
			[
				'label' => __( 'Progress Bar Description', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::WYSIWYG,
				'input_type' => 'WYSIWYG',
				'placeholder' => __( 'Description', 'endless-addons' ),
				'default' => __( 'Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget malesuada. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula.', 'endless-addons'),
				'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04'),
                    'ea_content_text_type' => 'content'
                ]
			]
		);

		$this->add_control(
            'ea_content_templates',
            [
                'label' => __('Choose Template', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::SELECT,
                'options' => ea_get_elementor_templates(),
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04'),
                    'ea_content_text_type' => 'template'
                ]
            ]
        );

		$this->add_control(
			'progress_featured_img',
			[
				'label' => __( 'Featured Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_progress_style' => array('style-01', 'style-03', 'style-05', 'style-06')
                ]
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Image_Size::get_type(),
			[
				'name' => 'thumbnail',
				'default' => 'full',
				'separator' => 'none',
				'exclude' => [
					'full',
					'custom',
					'large',
					'shop_catalog',
					'shop_single',
					'shop_thumbnail'
				],
				'condition' => [
					'select_progress_style' => array('style-01', 'style-03', 'style-05')
				]
			]
		);

		$this->add_control(
			'progress_shape_img',
			[
				'label' => __( 'Shape Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_progress_style' => 'style-03'
                ]
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'progress_bar_data',
			[
				'label' => __( 'Progress Bar Data', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);

		$repeater = new \Elementor\Repeater();

		$repeater->add_control(
			'progress_data_title',
			[
				'label' => __( 'Data Title', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Title', 'endless-addons' ),
				'default'  => __( 'Development', 'endless-addons' ),
			]
		);

		$repeater->add_control(
			'progress_data_percent',
			[
				'label' => __( 'Data Percent', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'placeholder' => __( 'Percent', 'endless-addons' ),
				'default'  => __( '95', 'endless-addons' ),
			]
		);

		$this->add_control(
			'single_progress_data',
			[
				'label' => __( 'Single Progress Data', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::REPEATER,
				'fields' => $repeater->get_controls(),
				'default' => [
					[
						'list_title' => __( 'Single Data #1', 'endless-addons' ),
						'list_content' => __( 'Single Data Content', 'endless-addons' ),
					],
				
				],
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'section_style',
			[
				'label' => __( 'Section Style', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

		$this->add_control(
			'section_title_color',
			[
				'label' => __( 'Section Title Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-progress-bar-area .section-title h2' => 'color: {{VALUE}}'
                ]
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'section_title_typography',
                'label' => __( 'Section Title Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-progress-bar-area .section-title h2'
            ]
        );

        $this->add_control(
			'section_desc_color',
			[
				'label' => __( 'Section Description Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-progress-bar-area .section-title p' => 'color: {{VALUE}}'
                ]
			]
		);

        $this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'section_desc_typography',
                'label' => __( 'Section Description Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-progress-bar-area .section-title p'
            ]
        );

		$this->end_controls_section();

		$this->start_controls_section(
			'progress_bar_style',
			[
				'label' => __( 'Progress Bar Style', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

        $this->add_control(
			'progress_subtitle_color',
			[
				'label' => __( 'Subtitle Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-progress-bar-content .top-title' => 'color: {{VALUE}}'
                ],
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'progress_subtitle_typography',
                'label' => __( 'Subtitle Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-progress-bar-content .top-title',
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
            ]
        );

        $this->add_control(
			'progress_title_color',
			[
				'label' => __( 'Title Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-progress-bar-content .ea-title' => 'color: {{VALUE}}'
                ],
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'progress_title_typography',
                'label' => __( 'Title Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-progress-bar-content .ea-title',
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
            ]
        );

        $this->add_control(
			'progress_desc_color',
			[
				'label' => __( 'Description Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-progress-bar-content p' => 'color: {{VALUE}}'
                ],
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'progress_desc_typography',
                'label' => __( 'Description Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-progress-bar-content p',
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04')
                ]
            ]
        );

        $this->add_control(
			'progress_bar_color',
			[
				'label' => __( 'Bar Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-all-skill-bar .skill-bar .progress-content' => 'background: {{VALUE}}'
                ],
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04', 'style-05')
                ]
			]
		);

		$this->add_control(
			'progress_bar_bg_color',
			[
				'label' => __( 'Bar Background Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-all-skill-bar .skill-bar .progress-content-outter' => 'background: {{VALUE}} !important'
                ],
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-04', 'style-05')
                ]
			]
		);

		$this->add_control(
			'progress_bar6_color',
			[
				'label' => __( 'Bar Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .progress-bar .rotate, .single-progress .progress-wrap .progress-bar .right' => 'background-color: {{VALUE}} !important'
                ],
                'condition' => [
                    'select_progress_style' => 'style-06'
                ]
			]
		);

		$this->add_control(
			'progress_bar6_bg_color',
			[
				'label' => __( 'Bar Background Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .single-progress .progress-wrap .progress-bar div span, .single-progress .progress-wrap .progress-bar .background' => 'background: {{VALUE}} !important'
                ],
                'condition' => [
                    'select_progress_style' => 'style-06'
                ]
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'progress_data_style',
			[
				'label' => __( 'Data Style', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

        $this->add_control(
			'progress_data_title_color',
			[
				'label' => __( 'Data Title Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} span.progress-title' => 'color: {{VALUE}}'
                ],
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'progress_data_title_typography',
                'label' => __( 'Data Title Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} span.progress-title',
            ]
        );

        $this->add_control(
			'progress_percent_title_color',
			[
				'label' => __( 'Percent Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .progress-title-holder span span, .single-progress .progress-wrap .progress-bar div span' => 'color: {{VALUE}}'
                ],
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-05', 'style-06')
                ]
			]
		);

		$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'progress_percent_title_typography',
                'label' => __( 'Percent Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .progress-title-holder span span, .progress-bar div span',
                'condition' => [
                    'select_progress_style' => array('style-01', 'style-02', 'style-03', 'style-05', 'style-06')
                ]
            ]
        );

		$this->end_controls_section();

		$this->start_controls_section(
			'parallax_style',
			[
				'label' => __( 'Background Parallax', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE,
				'condition' => [
                    'select_progress_style' => array('style-02', 'style-04'),
               ]
			]
		);

		$this->add_control(
			'enable_parallax',
			[
				'label' => __( 'Enable Parallax', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SWITCHER,
				'label_on' => __( 'Yes', 'endless-addons' ),
				'label_off' => __( 'No', 'endless-addons' ),
				'return_value' => 'yes',
				'default' => 'no',
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'_section_overlay_style',
			[
				'label' => __('Background Overlay', 'endless-addons'),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE,
			]
		);

		$this->start_controls_tabs('_tabs_overlay_style');

		$this->start_controls_tab(
			'_tab_overlay_normal',
			[
				'label' => __('Normal', 'endless-addons'),
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name'     => 'hover_overlay_normal',
				'label' => __('Background', 'endless-addons'),
				'show_label' => true,
				'types' => ['classic', 'gradient'],
				'exclude' => [
					'classic' => 'image'
				],
				'selector' => '{{WRAPPER}} .ea-progress-bar-area, .ea-progress-bar-area.style-two::before, .ea-progress-bar-area.style-three::before',
			]
		);

		$this->end_controls_tab();

		$this->start_controls_tab(
			'_tab_overlay_hover',
			[
				'label' => __('Hover', 'endless-addons'),
			]
		);


		$this->add_group_control(
			\Elementor\Group_Control_Background::get_type(),
			[
				'name'     => 'hover_overlay_hover',
				'label' => __('Background', 'endless-addons'),
				'show_label' => true,
				'types' => ['classic', 'gradient'],
				'exclude' => [
					'classic' => 'image'
				],
				'selector' => '{{WRAPPER}} .ea-progress-bar-area:hover, .ea-progress-bar-area.style-two:hover::before, .ea-progress-bar-area.style-three:hover::before',
			]
		);

		$this->end_controls_tab();

		$this->end_controls_tabs();

		$this->end_controls_section();

		require plugin_dir_path( dirname( __FILE__ ) ) . 'floating/ea-progress-floating.php';

	}

	/**
	 * Render Progress Bar widget output on the frontend.
	 *
	 * Written in PHP and used to generate the final HTML.
	 *
	 * @since 1.0.5
	 * @access protected
	 */
	protected function render() {

		$settings = $this->get_settings_for_display(); 

		if( $settings['show_progress_bar'] == 'show' ) :

			if( $settings['select_progress_style'] == 'style-01' ) : ?>
				<!-- Start Progress Bar Design One Area -->
				<section class="ea-progress-bar-area pb-100">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html__($settings['progress_section_title']); ?></h2>
		                    <p><?php echo wp_kses_post($settings['progress_section_desc']); ?></p>
		                </div>
	                    <div class="row align-items-center">
	                        <div class="col-lg-6">
	                        	<div class="ea-progress-bar-content">
	                        		<span class="top-title"><?php echo esc_html__($settings['progress_subtitle']); ?></span>
	                        		<<?php echo esc_attr($settings['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($settings['progress_title']); ?></<?php echo esc_attr($settings['ea_title_tag']); ?>>
		                            <?php if($settings['ea_content_text_type'] == 'content') : ?>
		                                <p><?php echo wp_kses_post($settings['progress_desc']); ?></p>
		                            <?php elseif($settings['ea_content_text_type'] == 'template') : ?>
		                            	<p>
		                            		<?php if (!empty($settings['ea_content_templates'])) {
								                echo Plugin::$instance->frontend->get_builder_content($settings['ea_content_templates'], true);
								            } ?>
		                            	</p>
		                            <?php endif; ?>
		                        </div>
		                        <div class="ea-all-skill-bar ea-mb-30">
		                        	<?php foreach ( $settings['single_progress_data'] as $item ) : ?>
			                            <div class="skill-bar" data-percentage="<?php echo esc_attr( $item['progress_data_percent'] ); ?>%">
			                                <h4 class="progress-title-holder">
			                                    <span class="progress-title"><?php echo esc_attr( $item['progress_data_title'] ); ?></span>
			                                    <span class="progress-number-wrapper">
			                                        <span class="progress-number-mark">
			                                            <span class="percent"></span>
			                                            <span class="down-arrow"></span>
			                                        </span>
			                                    </span>
			                                </h4>
			                                <div class="progress-content-outter">
			                                    <div class="progress-content"></div>
			                                </div>
			                            </div>
			                        <?php endforeach; ?>
		                        </div>
	                        </div>
	                        <div class="col-lg-6">
	                            <div class="progress-bar-img-one ea-elementor-floating">
	                                <?php if( ! $settings['progress_featured_img']['url'] == '' ) : echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'progress_featured_img' ); ?>
				                    <?php endif; ?>
	                            </div>
	                        </div>
	                    </div>
		            </div>
		        </section>
		        <!-- End Progress Bar Design One Area -->
		    <?php elseif( $settings['select_progress_style'] == 'style-02' ) : ?>
				<!-- Start Progress Bar Design Two Area -->
				<section class="ea-progress-bar-area style-two ptb-100 ea-elementor-floating">
		            <div class="container">
		                <div class="section-title white-title">
		                    <h2><?php echo esc_html__($settings['progress_section_title']); ?></h2>
		                    <p><?php echo wp_kses_post($settings['progress_section_desc']); ?></p>
		                </div>
	                    <div class="row align-items-center">
	                        <div class="col-lg-6">
	                        	<div class="ea-progress-bar-content style-two">
	                        		<span class="top-title"><?php echo esc_html__($settings['progress_subtitle']); ?></span>
		                            <<?php echo esc_attr($settings['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($settings['progress_title']); ?></<?php echo esc_attr($settings['ea_title_tag']); ?>>
		                            <?php if($settings['ea_content_text_type'] == 'content') : ?>
		                                <p><?php echo wp_kses_post($settings['progress_desc']); ?></p>
		                            <?php elseif($settings['ea_content_text_type'] == 'template') : ?>
		                            	<p>
		                            		<?php if (!empty($settings['ea_content_templates'])) {
								                echo Plugin::$instance->frontend->get_builder_content($settings['ea_content_templates'], true);
								            } ?>
		                            	</p>
		                            <?php endif; ?>
		                        </div>
		                    </div>
		                    <div class="col-lg-6">
		                        <div class="ea-all-skill-bar style-two">
		                        	<?php foreach ( $settings['single_progress_data'] as $item ) : ?>
			                            <div class="skill-bar" data-percentage="<?php echo esc_attr( $item['progress_data_percent'] ); ?>%">
			                                <h4 class="progress-title-holder">
			                                    <span class="progress-title"><?php echo esc_attr( $item['progress_data_title'] ); ?></span>
			                                    <span class="progress-number-wrapper">
			                                        <span class="progress-number-mark">
			                                            <span class="percent"></span>
			                                            <span class="down-arrow"></span>
			                                        </span>
			                                    </span>
			                                </h4>
			                                <div class="progress-content-outter">
			                                    <div class="progress-content"></div>
			                                </div>
			                            </div>
			                        <?php endforeach; ?>
		                        </div>
	                        </div>
	                    </div>
		            </div>
		        </section>
		        <!-- End Progress Bar Design Two Area -->
		        <?php if($settings['enable_parallax'] == 'yes' ){ ?>
			    	<style>
			    		.ea-progress-bar-area.style-two {
			    			background-attachment: fixed;
			    		}
			    	</style>
			    <?php } ?>
		    <?php elseif( $settings['select_progress_style'] == 'style-03' ) : ?>
				<!-- Start Progress Bar Design Three Area -->
				<section class="ea-progress-bar-area ptb-100">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html__($settings['progress_section_title']); ?></h2>
		                    <p><?php echo wp_kses_post($settings['progress_section_desc']); ?></p>
		                </div>
	                    <div class="row align-items-center">
	                        <div class="col-lg-6">
	                        	<div class="ea-progress-bar-content">
	                        		<span class="top-title"><?php echo esc_html__($settings['progress_subtitle']); ?></span>
		                            <<?php echo esc_attr($settings['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($settings['progress_title']); ?></<?php echo esc_attr($settings['ea_title_tag']); ?>>
		                            <?php if($settings['ea_content_text_type'] == 'content') : ?>
		                                <p><?php echo wp_kses_post($settings['progress_desc']); ?></p>
		                            <?php elseif($settings['ea_content_text_type'] == 'template') : ?>
		                            	<p>
		                            		<?php if (!empty($settings['ea_content_templates'])) {
								                echo Plugin::$instance->frontend->get_builder_content($settings['ea_content_templates'], true);
								            } ?>
		                            	</p>
		                            <?php endif; ?>
		                        </div>
		                        <div class="ea-all-skill-bar style-three ea-mb-30">
		                        	<?php foreach ( $settings['single_progress_data'] as $item ) : ?>
			                            <div class="skill-bar" data-percentage="<?php echo esc_attr( $item['progress_data_percent'] ); ?>%">
			                                <h4 class="progress-title-holder">
			                                    <span class="progress-title"><?php echo esc_attr( $item['progress_data_title'] ); ?></span>
			                                    <span class="progress-number-wrapper">
			                                        <span class="progress-number-mark">
			                                            <span class="percent"></span>
			                                            <span class="down-arrow"></span>
			                                        </span>
			                                    </span>
			                                </h4>
			                                <div class="progress-content-outter">
			                                    <div class="progress-content"></div>
			                                </div>
			                            </div>
			                        <?php endforeach; ?>
		                        </div>
	                        </div>
		                    <div class="col-lg-6">
		                    	<div class="ea-progress-bar-img-two ea-elementor-floating">
	                                <?php if( ! $settings['progress_featured_img']['url'] == '' ) : echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'progress_featured_img' ); ?>
				                    <?php endif; ?>
			                        <?php if($settings['progress_shape_img']['url']): ?>
				                        <div class="progress-bar-shape">
			                                <img src="<?php echo esc_url($settings['progress_shape_img']['url']);  ?>" alt="Image">
			                            </div>
		                            <?php endif; ?>
	                            </div>
		                    </div>
	                    </div>
		            </div>
		        </section>
		        <!-- End Progress Bar Design Three Area -->
		    <?php elseif( $settings['select_progress_style'] == 'style-04' ) : ?>
				<!-- Start Progress Bar Design Four Area -->
				<section class="ea-progress-bar-area style-three ptb-100 ea-elementor-floating">
		            <div class="container">
		                <div class="section-title white-title">
		                    <h2><?php echo esc_html__($settings['progress_section_title']); ?></h2>
		                    <p><?php echo wp_kses_post($settings['progress_section_desc']); ?></p>
		                </div>
		                <div class="ea-progres-and-content-wrap">
	                        <div class="ea-progress-bar-content text-center">
                        		<span class="top-title"><?php echo esc_html__($settings['progress_subtitle']); ?></span>
	                            <<?php echo esc_attr($settings['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($settings['progress_title']); ?></<?php echo esc_attr($settings['ea_title_tag']); ?>>
	                            <?php if($settings['ea_content_text_type'] == 'content') : ?>
		                                <p><?php echo wp_kses_post($settings['progress_desc']); ?></p>
	                            <?php elseif($settings['ea_content_text_type'] == 'template') : ?>
	                            	<p>
	                            		<?php if (!empty($settings['ea_content_templates'])) {
							                echo Plugin::$instance->frontend->get_builder_content($settings['ea_content_templates'], true);
							            } ?>
	                            	</p>
	                            <?php endif; ?>
	                        </div>
		                    <div class="ea-all-skill-bar style-four">
		                    	<div class="row">
		                        	<?php foreach ( $settings['single_progress_data'] as $item ) : ?>  
		                        		<div class="col-lg-6">
				                            <div class="skill-bar" data-percentage="<?php echo esc_attr( $item['progress_data_percent'] ); ?>%">
				                                <h4 class="progress-title-holder">
				                                    <span class="progress-title"><?php echo esc_attr( $item['progress_data_title'] ); ?></span>
				                                    <span class="progress-number-wrapper">
				                                        <span class="progress-number-mark">
				                                            <span class="percent"></span>
				                                            <span class="down-arrow"></span>
				                                        </span>
				                                    </span>
				                                </h4>
				                                <div class="progress-content-outter">
				                                    <div class="progress-content"></div>
				                                </div>
				                            </div>
				                        </div>
			                        <?php endforeach; ?>
			                    </div>
	                        </div>
	                    </div>
		            </div>
		        </section>
		        <!-- End Progress Bar Design Four Area -->
		        <?php if($settings['enable_parallax'] == 'yes' ){ ?>
			    	<style>
			    		.ea-progress-bar-area.style-three {
			    			background-attachment: fixed;
			    		}
			    	</style>
			    <?php } ?>
		    <?php elseif( $settings['select_progress_style'] == 'style-05' ) : ?>
				<!-- Start Progress Bar Design Five Area -->
				<section class="ea-progress-bar-area style-five pb-100">
		            <div class="container">
		            	<div class="section-title">
		                    <h2><?php echo esc_html__($settings['progress_section_title']); ?></h2>
		                    <p><?php echo wp_kses_post($settings['progress_section_desc']); ?></p>
		                </div>
	                    <div class="row align-items-center">
	                        <div class="col-lg-7">
		                        <div class="ea-all-skill-bar style-five ea-mb-30 ptb-100">
		                        	<?php foreach ( $settings['single_progress_data'] as $item ) : ?>
			                            <div class="skill-bar" data-percentage="<?php echo esc_attr( $item['progress_data_percent'] ); ?>%">
			                                <h4 class="progress-title-holder">
			                                    <span class="progress-title"><?php echo esc_attr( $item['progress_data_title'] ); ?></span>
			                                    <span class="progress-number-wrapper">
			                                        <span class="progress-number-mark">
			                                            <span class="percent"></span>
			                                            <span class="down-arrow"></span>
			                                        </span>
			                                    </span>
			                                </h4>
			                                <div class="progress-content-outter">
			                                    <div class="progress-content"></div>
			                                </div>
			                            </div>
			                        <?php endforeach; ?>
		                        </div>
	                        </div>
	                        <div class="col-lg-5">
	                            <div class="progress-bar-img-one ea-elementor-floating">
	                                <?php if( ! $settings['progress_featured_img']['url'] == '' ) : echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'progress_featured_img' ); ?>
				                    <?php endif; ?>
	                            </div>
	                        </div>
	                    </div>
		            </div>
		        </section>
		        <!-- End Progress Bar Design Five Area -->
		    <?php elseif( $settings['select_progress_style'] == 'style-06' ) : ?>
				<!-- Start Progress Bar Design Six Area -->
				<section class="ea-progress-bar-area style-six bg-shape">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html__($settings['progress_section_title']); ?></h2>
		                    <p><?php echo wp_kses_post($settings['progress_section_desc']); ?></p>
		                </div>
		                <div class="progress-bar-img-two ea-elementor-floating">
                            <?php if($settings['progress_featured_img']['url']) : echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'progress_featured_img' ); ?>
		                    <?php endif; ?>
                        </div>
	                    <div class="row">
	                    	<?php foreach ( $settings['single_progress_data'] as $item ) : ?>
		                        <div class="col">
		                        	<div class="single-progress">
		                        		<div class="progress-wrap">
		                        			<div class="progress-bar progress-count" data-percent="<?php echo esc_attr( $item['progress_data_percent'] ); ?>"></div>
		                        		</div>
		                        		<div class="progress-content">
		                        			<span class="progress-title"><?php echo esc_attr( $item['progress_data_title'] ); ?></span>
		                        		</div>
		                        	</div>
		                        </div>
	                        <?php endforeach; ?>
	                    </div>
		            </div>
		        </section>
		        <!-- End Progress Bar Design Six Area -->
	        <?php endif;
			
        endif;

    }

}
