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

use \Elementor\Plugin;

class Elementor_Iconbox_Widget extends \Elementor\Widget_Base {

	/**
	 * Get widget name.
	 *
	 * Retrieve Icon Box widget name.
	 *
	 * @since 1.0.5
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'icon-box';
	}

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

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

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

	/**
	 * Register Icon Box 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_iconbox',
			[
				'label' => __( 'Show/Hide Icon Box 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_iconbox_style',
			[
				'label' => __( 'Select Icon Box 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' ),
					'style-07' => __( 'Style 07', 'endless-addons' ),
					'style-08' => __( 'Style 08', 'endless-addons' )
				],
				'default' => 'style-01'
			]
		);

		$this->end_controls_section();

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

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

		$this->add_control(
			'section_desc',
			[
				'label' => __( 'Section 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_control(
			'iconbox_readmore_text', [
				'label' => __( 'Text', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'default'  => __( 'Read More', 'endless-addons' ),
				'condition' => [
                    'select_iconbox_style' => 'style-04'
                ]
			]
		);

		$this->add_control(
			'iconbox_readmore_link', [
				'label' => __( 'URL', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::URL,
				'input_type' => 'url',
				'default' => [
					'url' => '#',
					'is_external' => true,
					'nofollow' => true
				],
				'condition' => [
                    'select_iconbox_style' => 'style-04'
                ]
			]
		);

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

		$this->end_controls_section();

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

		$this->add_control(
			'iconbox_item_column',
			[
				'label' => __( 'Select Iconbox Column', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'input_type' => 'SELECT',
				'options' => [
					'columns-2' => __( '2', 'endless-addons' ),
					'columns-3' => __( '3', 'endless-addons' ),
					'columns-4' => __( '4', 'endless-addons' )
				],
				'default' => 'columns-4'
			]
		);

		$this->add_control(
			'iconbox_featured_img',
			[
				'label' => __( 'Featured Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
				'condition' => [
                    'select_iconbox_style' => 'style-07'
                ]
			]
		);

        $this->add_control(
            'iconbox_icon_v_alignment',
            [
                'label' => esc_html__('Icon/Image/Number Vertical Alignment', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::CHOOSE,
                'label_block' => true,
                'options' => [
                    'top' => [
                        'title' => __('Top', 'endless-addons'),
                        'icon' => 'eicon-v-align-top',
                    ],
                    'bottom' => [
                        'title' => __('Bottom', 'endless-addons'),
                        'icon' => 'eicon-v-align-bottom',
                    ],
                ],
                'default' => 'top',
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06', 'style-07', 'style-08')
                ]
            ]
        );

        $this->add_control(
            'iconbox_icon_h_alignment',
            [
                'label' => esc_html__('Icon/Image/Number Horizontal Alignment', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::CHOOSE,
                'label_block' => true,
                'options' => [
                    'left' => [
                        'title' => esc_html__('Left', 'endless-addons'),
                        'icon' => 'fa fa-align-left',
                    ],
                    'center' => [
                        'title' => esc_html__('Center', 'endless-addons'),
                        'icon' => 'fa fa-align-center',
                    ],
                    'right' => [
                        'title' => esc_html__('Right', 'endless-addons'),
                        'icon' => 'fa fa-align-right',
                    ],
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06', 'style-07', 'style-08'),
                    'iconbox_icon_v_alignment' => 'top'
                ]
            ]
        );

        $this->add_control(
            'iconbox_content_h_alignment',
            [
                'label' => esc_html__('Content Horizontal Alignment', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::CHOOSE,
                'label_block' => true,
                'options' => [
                    'left' => [
                        'title' => esc_html__('Left', 'endless-addons'),
                        'icon' => 'fa fa-align-left',
                    ],
                    'center' => [
                        'title' => esc_html__('Center', 'endless-addons'),
                        'icon' => 'fa fa-align-center',
                    ],
                    'right' => [
                        'title' => esc_html__('Right', 'endless-addons'),
                        'icon' => 'fa fa-align-right',
                    ],
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06', 'style-07', 'style-08')
                ]
            ]
        );

		$repeater = new \Elementor\Repeater();

		$repeater->add_control(
            'single_iconbox_img_or_icon',
            [
                'label' => esc_html__('Show Icon, Image or Number', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::CHOOSE,
                'label_block' => true,
                'options' => [
                    'none' => [
                        'title' => esc_html__('None', 'endless-addons'),
                        'icon' => 'fa fa-ban',
                    ],
                    'icon' => [
                        'title' => esc_html__('Icon', 'endless-addons'),
                        'icon' => 'fa fa-info-circle',
                    ],
                    'img' => [
                        'title' => esc_html__('Image', 'endless-addons'),
                        'icon' => 'fa fa-picture-o',
                    ],
                    'number' => [
                        'title' => esc_html__('Number', 'endless-addons'),
                        'icon' => 'fa fa-sort-numeric-desc',
                    ],
                ],
                'default' => 'img',
            ]
        );

		$repeater->add_control(
			'single_iconbox_icon_fa', [
				'label' => __( 'Icon', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::ICONS,
				'input_type' => 'icon',
				'show_label' => true,
				'options' => endless_addons_icons(),
				'condition' => [
                    'single_iconbox_img_or_icon' => 'icon'
                ]
			]
		);

	    $repeater->add_control(
			'single_iconbox_icon', [
				'label' => __( 'Icon', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
                'show_label' => true,
                'default' => [
					'url' => plugin_dir_url( dirname( __FILE__ ) ) . '../public/img/iconbox/icon-1.png'
				],
				'condition' => [
                    'single_iconbox_img_or_icon' => 'img'
                ]
			]
		);

		$repeater->add_control(
			'single_iconbox_ico_number', [
				'label' => __( 'Number', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::NUMBER,
                'show_label' => true,
                'default' => '1',
				'condition' => [
                    'single_iconbox_img_or_icon' => 'number'
                ]
			]
		);

		$repeater->add_control(
			'single_iconbox_show_shape_img', [
				'label' => __( 'Show Shape Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
                    'yes' => [
                        'title' => __( 'Show', 'endless-addons' ),
                        'icon' => 'fa fa-check',
                    ],
                    'no' => [
                        'title' => __( 'Hide', 'endless-addons' ),
                        'icon' => 'fa fa-close',
                    ],
                ],
                'default' => 'no',
				'description' => 'Used Only For Style-02 & Style-07'
			]
		);

		$repeater->add_control(
			'single_iconbox_shape_img', [
				'label' => __( 'Shape Image', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
                'show_label' => true,
                'condition' => [
                    'single_iconbox_show_shape_img' => 'yes'
                ]
			]
		);

		$repeater->add_control(
			'single_iconbox_number', [
				'label' => __( 'Number', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
                'show_label' => true,
                'description' => 'Used Only For Style-05'
			]
		);

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

		$repeater->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' => 'h3'
			]
		);

		$repeater->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',
            ]
        );

		$repeater->add_control(
			'single_iconbox_desc', [
				'label' => __( 'Description', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXTAREA,
				'input_type' => 'textarea',
				'placeholder' => __( 'Description', 'endless-addons' ),
				'default'  => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor  in cididunt labore dolore', 'endless-addons' ),
				'condition' => [
                    'ea_content_text_type' => 'content'
                ]
			]
		);

		$repeater->add_control(
            'ea_content_templates',
            [
                'label' => __('Choose Template', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::SELECT,
                'options' => ea_get_elementor_templates(),
                'condition' => [
                    'ea_content_text_type' => 'template',
                ],
            ]
        );

		$repeater->add_control(
			'single_iconbox_show_readmore', [
				'label' => __( 'Show Read More', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
                    'yes' => [
                        'title' => __( 'Show', 'endless-addons' ),
                        'icon' => 'fa fa-check',
                    ],
                    'no' => [
                        'title' => __( 'Hide', 'endless-addons' ),
                        'icon' => 'fa fa-close',
                    ],
                ],
                'default' => 'no',
				'description' => 'Used Only For Style-02, Style-03 & Style-05'
			]
		);

		$repeater->add_control(
			'single_iconbox_readmore_text', [
				'label' => __( 'Text', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'input_type' => 'text',
				'default'  => __( 'Read More', 'endless-addons' ),
				'condition' => [
                    'single_iconbox_show_readmore' => 'yes'
                ]
			]
		);

		$repeater->add_control(
			'icon_type',
			[
				'label' => __( 'Icon Type', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'input_type' => 'SELECT',
				'options' => [
					'general' => __( 'General', 'endless-addons' ),
					'library' => __( 'Library', 'endless-addons' ),
				],
				'default' => 'general',
				'condition' => [
                    'single_iconbox_show_readmore' => 'yes'
                ]
			]
		);

		$repeater->add_control(
			'single_iconbox_readmore_icon1', 
			[
				'label' => __( 'Icon', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::ICON,
				'input_type' => 'icon',
				'default'  => 'bx bx-right-arrow-alt',
				'show_label' => true,
				'options' => endless_addons_icons(),
				'condition' => [
                    'icon_type' => 'general',
                    'single_iconbox_show_readmore' => 'yes'
                ]
			]
		);

		$repeater->add_control(
			'single_iconbox_readmore_icon2', 
			[
				'label' => __( 'Icon', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::ICONS,
				'input_type' => 'icon',
				'show_label' => true,
				'options' => endless_addons_icons(),
				'condition' => [
                    'icon_type' => 'library',
                    'single_iconbox_show_readmore' => 'yes'
                ]
			]
		);

		$repeater->add_control(
			'single_iconbox_readmore_link', [
				'label' => __( 'URL', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::URL,
				'input_type' => 'url',
				'default' => [
					'url' => '#',
					'is_external' => true,
					'nofollow' => true
				],
				'condition' => [
                    'single_iconbox_show_readmore' => 'yes'
                ]
			]
		);

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

		$this->end_controls_section();

		$this->start_controls_section(
			'section_images',
			[
				'label' => __( 'Iconbox Shape Images', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
				'condition' => [
                    'select_iconbox_style' => array('style-02', 'style-05')
                ]
			]
		);

		$this->add_control(
			'iconbox_shape_img1',
			[
				'label' => __( 'Shape Image 1', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
			]
		);

		$this->add_control(
			'iconbox_shape_img2',
			[
				'label' => __( 'Shape Image 2', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::MEDIA,
				'show_label' => true,
			]
		);

		$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-icon-box-area .section-title h2, .ea-icon-box-area .ea-icon-box-content 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-icon-box-area .section-title h2, .ea-icon-box-area .ea-icon-box-content h2'
            ]
        );

        $this->add_control(
			'section_desc_color',
			[
				'label' => __( 'Section Description Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .section-title p, .ea-icon-box-area .ea-icon-box-content 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-icon-box-area .section-title p, .ea-icon-box-area .ea-icon-box-content p'
            ]
        );

		$this->end_controls_section();

		$this->start_controls_section(
			'iconbox_icon_img_number_style',
			[
				'label' => __( 'Icon/Image/Number Style', 'endless-addons' ),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE
			]
		);

		$this->add_control(
			'iconbox_icon_bg_color',
			[
				'label' => __( 'Area Background Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon' => 'background-color: {{VALUE}}'
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06', 'style-07', 'style-08')
                ]
			]
		);

		$this->add_control(
			'iconbox_icon_color',
			[
				'label' => __( 'Icon/Number Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon i' => 'color: {{VALUE}}'
                ]
			]
		);

		$this->add_control(
            'iconbox_icon_size',
            [
                'label' => __('Icon/Number Size', 'endless-addons'),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'range' => [
                    'px' => [
                        'min' => 20,
                        'max' => 100,
                        'step' => 1,
                    ],
                ],
                'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon i' => 'font-size: {{SIZE}}px;',
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon img' => 'height: {{SIZE}}px; width: {{SIZE}}px;',
                ],
            ]
        );

        $this->add_control(
            'iconbox_icon_padding',
            [
                'label'         => esc_html__( 'Icon/Number Padding', 'endless-addons' ),
                'type'          => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units'    => [ 'px', '%', 'em' ],
                'selectors'     => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->add_control(
            'iconbox_icon_margin',
            [
                'label'         => esc_html__( 'Icon/Number Margin', 'endless-addons' ),
                'type'          => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units'    => [ 'px', '%', 'em' ],
                'selectors'     => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->add_control(
			'iconbox_icon_height',
			[
				'label' => __( 'Area Height', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SLIDER,
				'range' => [
					'px' => [
						'min' => 50,
						'max' => 500
					]
				],
				'selectors' => [
					'{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon i, .ea-icon-box-area .single-icon-box .icon' => 'height: {{SIZE}}{{UNIT}}',
				],
			]
		);

		$this->add_control(
			'iconbox_icon_width',
			[
				'label' => __( 'Area Width', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::SLIDER,
				'range' => [
					'px' => [
						'min' => 50,
						'max' => 500
					]
				],
				'selectors' => [
					'{{WRAPPER}} .ea-icon-box-area .single-icon-box .icon i, .ea-icon-box-area .single-icon-box .icon' => 'width: {{SIZE}}{{UNIT}}',
				],
			]
		);

		$this->add_control(
            'iconbox_icon_border_radius',
            [
                'label' => __( 'Border Radius', 'endless-addons' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px', '%' ],
                'separator' => 'after',
                'selectors' => [
                    '{{WRAPPER}}  .ea-icon-box-area .single-icon-box .icon i, .ea-icon-box-area .single-icon-box .icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

		$this->end_controls_section();

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

		$this->add_control(
			'iconbox_bg_color',
			[
				'label' => __( 'Iconbox Background Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box' => 'background-color: {{VALUE}}'
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06', 'style-07', 'style-08')
                ]
			]
		);

		$this->add_control(
			'iconbox_bg_hover_color',
			[
				'label' => __( 'Iconbox Background Hover Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box:hover' => 'background-color: {{VALUE}}'
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-04', 'style-05', 'style-06', 'style-07', 'style-08')
                ]
			]
		);

		$this->add_control(
			'iconbox_border_color',
			[
				'label' => __( 'Iconbox Border Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box' => 'border-color: {{VALUE}}'
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-04', 'style-05', 'style-06')
                ]
			]
		);

		$this->add_control(
			'iconbox_border_hover_color',
			[
				'label' => __( 'Iconbox Border Hover Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box:hover' => 'border-color: {{VALUE}}'
                ],
                'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-04', 'style-05', 'style-06')
                ]
			]
		);

        $this->add_control(
			'iconbox_title_color',
			[
				'label' => __( 'Iconbox Title Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box .ea-title' => 'color: {{VALUE}}'
                ]
			]
		);

        $this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'iconbox_title_typography',
                'label' => __( 'Iconbox Title Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-icon-box-area .single-icon-box .ea-title'
            ]
        );

         $this->add_control(
			'iconbox_desc_color',
			[
				'label' => __( 'Iconbox Description Color', 'endless-addons' ),
				'type' => \Elementor\Controls_Manager::COLOR,
				'selectors' => [
                    '{{WRAPPER}} .ea-icon-box-area .single-icon-box p' => 'color: {{VALUE}}'
                ]
			]
		);

        $this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'iconbox_desc_typography',
                'label' => __( 'Iconbox Description Typography', 'endless-addons' ),
                'scheme' => \Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .ea-icon-box-area .single-icon-box p'
            ]
        );

		$this->end_controls_section();

		$this->start_controls_section(
			'_section_overlay_style',
			[
				'label' => __('Background Overlay', 'endless-addons'),
				'tab' => \Elementor\Controls_Manager::TAB_STYLE,
				'condition' => [
                    'select_iconbox_style' => array('style-01', 'style-02', 'style-03', 'style-05', 'style-06', 'style-07', 'style-08')
                ]
			]
		);

		$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-icon-box-area',
			]
		);

		$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-icon-box-area:hover',
			]
		);

		$this->end_controls_tab();

		$this->end_controls_tabs();

		$this->end_controls_section();

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

	}

	/**
	 * Render Icon Box 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['iconbox_icon_h_alignment'] == 'left' ) : 
		    $this->add_render_attribute('iconbox_icon_align', 'class', 'icon-box-align is-icon-left');
		elseif( $settings['iconbox_icon_h_alignment'] == 'center' ) :
            $this->add_render_attribute('iconbox_icon_align', 'class', 'icon-box-align is-icon-center');
		elseif( $settings['iconbox_icon_h_alignment'] == 'right' ) :
            $this->add_render_attribute('iconbox_icon_align', 'class', 'icon-box-align is-icon-right');
        endif; 

        if( $settings['iconbox_content_h_alignment'] == 'left' ) : 
		    $this->add_render_attribute('iconbox_content_align', 'class', 'icon-box-align is-content-left');
		elseif( $settings['iconbox_content_h_alignment'] == 'center' ) :
            $this->add_render_attribute('iconbox_content_align', 'class', 'icon-box-align is-content-center');
		elseif( $settings['iconbox_content_h_alignment'] == 'right' ) :
            $this->add_render_attribute('iconbox_content_align', 'class', 'icon-box-align is-content-right');
        endif; ?>

		<!-- Infobox Column Style -->
	    <?php if( $settings['iconbox_item_column'] == 'columns-2' ) :
			$iconbox_column = 'col-lg-6 col-md-6 col-sm-6';
		elseif( $settings['iconbox_item_column'] == 'columns-3' ) :
			$iconbox_column = 'col-lg-4 col-md-6 col-sm-6';
		elseif( $settings['iconbox_item_column'] == 'columns-4' ) :
			$iconbox_column = 'col-lg-3 col-md-6 col-sm-6';
		endif; 

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

			if( $settings['select_iconbox_style'] == 'style-01' ) : ?>
				<!-- Start Icon Design One Area -->
		        <section class="ea-icon-box-area pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row">
		                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
			                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
		                            <div class="single-icon-box style-one">
		                            	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
		                            		<div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
		                            			<<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div><br/>
			                            <?php endif; ?>
			                        	<div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
				                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
				                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
					                            	<div class="icon">
					                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
					                            	</div>
				                                <?php endif;
				                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
				                            	<div class="icon">
				                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
				                            	</div>
				                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
				                            	<div class="icon">
				                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
				                            	</div>
				                            <?php endif; ?>
			                            </div>
			                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
			                            	<div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div>
			                            <?php endif; ?>
			                        </div>
			                    </div>
		                    <?php endforeach; ?>
		                </div>
		            </div>
		        </section>
		        <!-- End Icon Design One Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-02' ) : ?>
		    	<!-- Start Icon Design Two Area -->
		        <section class="ea-icon-box-area bg-colo-f0f2f9 pt-100 pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row">
		                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
			                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
			                        <div class="single-icon-box style-two">
			                        	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div><br/>
			                            <?php endif; ?>
			                        	<div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
				                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
				                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
					                            	<div class="icon">
					                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
					                            	</div>
				                                <?php endif;
				                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
				                            	<div class="icon">
				                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
				                            	</div>
				                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
				                            	<div class="icon">
				                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
				                            	</div>
				                            <?php endif; ?>
			                            </div>
			                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div>
			                            <?php endif; ?>
			                            <?php if( $item['single_iconbox_show_readmore'] == 'yes' ) : 
				                            $target = $item['single_iconbox_readmore_link']['is_external'] ? ' target="_blank"' : '';
		                                    $nofollow = $item['single_iconbox_readmore_link']['nofollow'] ? ' rel="nofollow"' : ''; ?>
				                            <a href="<?php echo esc_url( $item['single_iconbox_readmore_link']['url'] ); ?>" <?php echo wp_kses_post( $target ); ?> <?php echo wp_kses_post( $nofollow ); ?> class="read-more">
				                                <?php echo esc_html($item['single_iconbox_readmore_text']); ?>
				                                <?php if( $item['icon_type'] == 'general' ) : ?>
				                            	    <i class="<?php echo wp_kses_post( $item['single_iconbox_readmore_icon1'] ); ?>"></i>
				                            	<?php else: 
				                            		endad_render_icon( $item, 'icon', 'single_iconbox_readmore_icon2' ); 
				                            	endif; ?>
				                            </a>
			                            <?php endif; ?>
                                        <?php if( $item['single_iconbox_show_shape_img'] == 'yes' ) : 
				                            if( ! $item['single_iconbox_shape_img']['url'] == '' ) : ?>
					                            <div class="shape">
					                                <img src="<?php echo esc_url( $item['single_iconbox_shape_img']['url'] ); ?>" alt="Image">
					                            </div>
				                            <?php endif; 
			                            endif; ?>
			                        </div>
			                    </div>
		                    <?php endforeach; ?>
		                </div>
		            </div>
		            <?php if( ! $settings['iconbox_shape_img1']['url'] == '' ) : ?>
                        <div class="shape-1">
                            <img src="<?php echo esc_url( $settings['iconbox_shape_img1']['url'] ); ?>" alt="Image">
                        </div>
                    <?php endif; ?>
		            <?php if( ! $settings['iconbox_shape_img2']['url'] == '' ) : ?>
                        <div class="shape-2">
                            <img src="<?php echo esc_url( $settings['iconbox_shape_img2']['url'] ); ?>" alt="Image">
                        </div>
                    <?php endif; ?>
		        </section>
		        <!-- End Icon Design Two Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-03' ) : ?>
		    	<!-- Start Icon Design Three Area -->
		        <section class="ea-icon-box-area pt-100 pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row">
		                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
			                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
			                        <div class="single-icon-box style-three">
			                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
			                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?>
					                            <div class="icon">
					                                <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
					                            </div>
			                                <?php endif;
			                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
			                            	<div class="icon">
			                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
			                            	</div>
			                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
			                            	<div class="icon">
			                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
			                            	</div>
			                            <?php endif; ?>
			                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
							            <?php if($item['ea_content_text_type'] == 'content') : ?>
			                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
			                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
			                            	<p>
			                            		<?php if (!empty($item['ea_content_templates'])) {
									                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
									            } ?>
			                            	</p>
			                            <?php endif; ?>
			                            <?php if( $item['single_iconbox_show_readmore'] == 'yes' ) : 
				                            $target = $item['single_iconbox_readmore_link']['is_external'] ? ' target="_blank"' : '';
		                                    $nofollow = $item['single_iconbox_readmore_link']['nofollow'] ? ' rel="nofollow"' : ''; ?>
				                            <a href="<?php echo esc_url( $item['single_iconbox_readmore_link']['url'] ); ?>" <?php echo wp_kses_post( $target ); ?> <?php echo wp_kses_post( $nofollow ); ?> class="read-more">
				                                <?php echo esc_html($item['single_iconbox_readmore_text']); ?>
				                                <?php if( $item['icon_type'] == 'general' ) : ?>
				                            	    <i class="<?php echo wp_kses_post( $item['single_iconbox_readmore_icon1'] ); ?>"></i>
				                            	<?php else: 
				                            		endad_render_icon( $item, 'icon', 'single_iconbox_readmore_icon2' ); 
				                            	endif; ?>
				                            </a>
			                            <?php endif; ?>
			                        </div>
			                    </div>
		                    <?php endforeach; ?>
		                </div>
		            </div>
		        </section>
		        <!-- End Icon Design Three Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-04' ) : ?>
		    	<!-- Start Icon Design Four Area -->
		    	<?php if($settings['section_bg_img']['url'] == '') : ?>
		            <section class="ea-icon-box-area bg-color-d6e9e2 pt-100 pb-70">
		        <?php else: ?>
		        	<section class="ea-icon-box-area bg-color-d6e9e2 pt-100 pb-70">
		        <?php endif; ?>
		            <div class="container">
		            	<div class="row align-items-center">
		            		<div class="col-xl-6">
		            			<div class="ea-icon-box-content">
				                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
				                    <p><?php echo esc_html($settings['section_desc']); ?></p>
				                    <?php $target1 = $settings['iconbox_readmore_link']['is_external'] ? ' target="_blank"' : '';
                                    $nofollow1 = $settings['iconbox_readmore_link']['nofollow'] ? ' rel="nofollow"' : ''; ?>
		                            <a href="<?php echo esc_url( $settings['iconbox_readmore_link']['url'] ); ?>" <?php echo wp_kses_post( $target1 ); ?> <?php echo wp_kses_post( $nofollow1 ); ?> class="default-btn-custom ea-mb-30">
		                                <?php echo esc_html($settings['iconbox_readmore_text']); ?>
		                            </a>
				                </div>
				            </div>
				            <div class="col-xl-6">
				                <div class="row">
				                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
					                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
					                        <div class="single-icon-box style-four">
					                        	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
						                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
							                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
							                            <?php if($item['ea_content_text_type'] == 'content') : ?>
							                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
							                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
							                            	<p>
							                            		<?php if (!empty($item['ea_content_templates'])) {
													                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
													            } ?>
							                            	</p>
							                            <?php endif; ?>
							                        </div><br/>
					                            <?php endif; ?>
					                        	<div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
						                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
						                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
							                            	<div class="icon">
							                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
							                            	</div>
						                                <?php endif;
						                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
						                            	<div class="icon">
						                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
						                            	</div>
						                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
						                            	<div class="icon">
						                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
						                            	</div>
						                            <?php endif; ?>
					                            </div>
					                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
						                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
							                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
							                            <?php if($item['ea_content_text_type'] == 'content') : ?>
							                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
							                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
							                            	<p>
							                            		<?php if (!empty($item['ea_content_templates'])) {
													                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
													            } ?>
							                            	</p>
							                            <?php endif; ?>
							                        </div>
					                            <?php endif; ?>
					                        </div>
					                    </div>
				                    <?php endforeach; ?>
				                </div>
				            </div>
			            </div>
		            </div>
		        </section>
		        <!-- End Icon Design Four Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-05' ) : ?>
		    	<!-- Start Icon Design Five Area -->
		        <section class="ea-icon-box-area style-five pt-100 pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row">
		                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
			                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
			                        <div class="single-icon-box style-five">
			                        	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div><br/>
			                            <?php endif; ?>
			                        	<div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
				                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
				                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
					                            	<div class="icon">
					                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
					                            	</div>
				                                <?php endif;
				                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
				                            	<div class="icon">
				                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
				                            	</div>
				                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
				                            	<div class="icon">
				                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
				                            	</div>
				                            <?php endif; ?>
			                            </div>
			                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div>
			                            <?php endif; ?>
			                            <?php if( $item['single_iconbox_show_readmore'] == 'yes' ) : 
				                            $target = $item['single_iconbox_readmore_link']['is_external'] ? ' target="_blank"' : '';
		                                    $nofollow = $item['single_iconbox_readmore_link']['nofollow'] ? ' rel="nofollow"' : ''; ?>
				                            <a href="<?php echo esc_url( $item['single_iconbox_readmore_link']['url'] ); ?>" <?php echo wp_kses_post( $target ); ?> <?php echo wp_kses_post( $nofollow ); ?> class="read-more">
				                                <?php echo esc_html($item['single_iconbox_readmore_text']); ?>
				                                <?php if( $item['icon_type'] == 'general' ) : ?>
				                            	    <i class="<?php echo wp_kses_post( $item['single_iconbox_readmore_icon1'] ); ?>"></i>
				                            	<?php else: 
				                            		endad_render_icon( $item, 'icon', 'single_iconbox_readmore_icon2' ); 
				                            	endif; ?>
				                            </a>
			                            <?php endif; ?>
			                            <span><?php echo esc_html($item['single_iconbox_number']); ?></span>
			                        </div>
			                    </div>
		                    <?php endforeach; ?>
		                </div>
		            </div>
		            <?php if( ! $settings['iconbox_shape_img1']['url'] == '' ) : ?>
                        <div class="shape-1">
                            <img src="<?php echo esc_url( $settings['iconbox_shape_img1']['url'] ); ?>" alt="Image">
                        </div>
                    <?php endif; ?>
		            <?php if( ! $settings['iconbox_shape_img2']['url'] == '' ) : ?>
                        <div class="shape-2">
                            <img src="<?php echo esc_url( $settings['iconbox_shape_img2']['url'] ); ?>" alt="Image">
                        </div>
                    <?php endif; ?>
		        </section>
		        <!-- End Icon Design Five Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-06' ) : ?>
		    	<!-- Start Icon Design Six Area -->
		        <section class="ea-icon-box-area pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row">
		                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
			                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
			                        <div class="single-icon-box style-six">
			                        	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div><br/>
			                            <?php endif; ?>
			                        	<div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
				                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
				                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
					                            	<div class="icon">
					                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
					                            	</div>
				                                <?php endif;
				                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
				                            	<div class="icon">
				                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
				                            	</div>
				                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
				                            	<div class="icon">
				                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
				                            	</div>
				                            <?php endif; ?>
			                            </div>
			                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div>
			                            <?php endif; ?>
			                        </div>
		                        </div>
		                    <?php endforeach; ?>
		                </div>
		            </div>
		        </section>
		        <!-- End Icon Design Six Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-07' ) : ?>
		    	<!-- Start Icon Design Seven Area -->
		        <section class="ea-icon-box-area bg-color-fdf6f0 pt-100 pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row align-items-center">
		                	<div class="col-lg-5">
		                		<?php if( ! $settings['iconbox_featured_img']['url'] == '' ) : ?>
			                        <div class="ea-icon-box-img ea-mb-30 ea-elementor-floating">
			                            <img src="<?php echo esc_url( $settings['iconbox_featured_img']['url'] ); ?>" alt="Image">
			                        </div>
			                    <?php endif; ?>
		                    </div>
		                    <div class="col-lg-7">
				                <div class="row">
				                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
					                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
					                        <div class="single-icon-box style-seven">
					                        	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
						                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
							                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
							                            <?php if($item['ea_content_text_type'] == 'content') : ?>
							                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
							                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
							                            	<p>
							                            		<?php if (!empty($item['ea_content_templates'])) {
													                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
													            } ?>
							                            	</p>
							                            <?php endif; ?>
							                        </div><br/>
					                            <?php endif; ?>
					                        	<div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
						                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
						                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
							                            	<div class="icon">
							                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
							                            	</div>
						                                <?php endif;
						                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
						                            	<div class="icon">
						                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
						                            	</div>
						                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
						                            	<div class="icon">
						                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
						                            	</div>
						                            <?php endif; ?>
					                            </div>
					                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
						                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
							                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
							                            <?php if($item['ea_content_text_type'] == 'content') : ?>
							                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
							                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
							                            	<p>
							                            		<?php if (!empty($item['ea_content_templates'])) {
													                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
													            } ?>
							                            	</p>
							                            <?php endif; ?>
							                        </div>
					                            <?php endif; ?>
					                            <?php if( $item['single_iconbox_show_shape_img'] == 'yes' ) : 
						                            if( ! $item['single_iconbox_shape_img']['url'] == '' ) : ?>
							                            <div class="shape">
							                                <img src="<?php echo esc_url( $item['single_iconbox_shape_img']['url'] ); ?>" alt="Image">
							                            </div>
						                            <?php endif; 
					                            endif; ?>
					                        </div>
					                    </div>
				                    <?php endforeach; ?>
				                </div>
				            </div>
				        </div>
		            </div>
		        </section>
		        <!-- End Icon Design Seven Area -->
		    <?php elseif( $settings['select_iconbox_style'] == 'style-08' ) : ?>
		    	<!-- Start Icon Design Eight Area -->
		        <section class="ea-icon-box-area style-eight bg-shape pt-100 pb-70">
		            <div class="container">
		                <div class="section-title">
		                    <h2><?php echo esc_html($settings['section_title']); ?></h2>
		                    <p><?php echo esc_html($settings['section_desc']); ?></p>
		                </div>
		                <div class="row">
		                	<?php foreach ( $settings['single_iconbox'] as $item ) : ?>
			                    <div class="iconbox-col <?php echo esc_attr( $iconbox_column ); ?>">
			                        <div class="single-icon-box style-eight">
			                        	<?php if( $settings['iconbox_icon_v_alignment'] == 'bottom' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div><br/>
			                            <?php endif; ?>
			                            <div <?php echo $this->get_render_attribute_string('iconbox_icon_align'); ?>>
				                        	<?php if( $item['single_iconbox_img_or_icon'] == 'img' ) : 
				                        	    if( ! $item['single_iconbox_icon']['url'] == '' ) : ?> 
					                            	<div class="icon">
					                            	    <img src="<?php echo esc_url( $item['single_iconbox_icon']['url'] ); ?>" alt="Icon">
					                            	</div>
				                                <?php endif;
				                            elseif( $item['single_iconbox_img_or_icon'] == 'icon' ) : ?>
				                            	<div class="icon">
				                            	    <?php endad_render_icon( $item, 'icon', 'single_iconbox_icon_fa' ); ?>
				                            	</div>
				                            <?php elseif( $item['single_iconbox_img_or_icon'] == 'number' ) : ?>
				                            	<div class="icon">
				                            	    <i><?php echo esc_html($item['single_iconbox_ico_number']); ?></i>
				                            	</div>
				                            <?php endif; ?>
			                            </div>
			                            <?php if( $settings['iconbox_icon_v_alignment'] == 'top' ) : ?>
				                            <div <?php echo $this->get_render_attribute_string('iconbox_content_align'); ?>>
					                            <<?php echo esc_attr($item['ea_title_tag']); ?> class="ea-title"><?php echo esc_html($item['single_iconbox_title']); ?></<?php echo esc_attr($item['ea_title_tag']); ?>>
					                            <?php if($item['ea_content_text_type'] == 'content') : ?>
					                                <p><?php echo wp_kses_post($item['single_iconbox_desc']); ?></p>
					                            <?php elseif($item['ea_content_text_type'] == 'template') : ?>
					                            	<p>
					                            		<?php if (!empty($item['ea_content_templates'])) {
											                echo Plugin::$instance->frontend->get_builder_content($item['ea_content_templates'], true);
											            } ?>
					                            	</p>
					                            <?php endif; ?>
					                        </div>
			                            <?php endif; ?>
			                        </div>
			                    </div>
		                    <?php endforeach; ?>
		                </div>
		            </div>
		        </section>
		        <!-- End Icon Design Eight Area -->
            <?php endif;

        endif;

    }

}
