<?php
namespace Elementor;

/**
 * Elementor Widget
 * @package Geroz
 * @since 1.0.0
 */ 
 
class Home1_About extends Widget_Base {

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

	/**
	 * Get widget title.
	 * Retrieve button widget title.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget title.
	 */
	public function get_title() {
		return esc_html__( 'Home 1 About', 'geroz-core' );
	}

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

	/**
	 * Get widget categories.
	 * Retrieve the list of categories the button widget belongs to.
	 * Used to determine where to display the widget in the editor.
	 *
	 * @since  2.0.0
	 * @access public
	 * @return array Widget categories.
	 */
	public function get_categories()
    {
        return ['geroz_widgets'];
    }
	
	/**
	 * Register button widget controls.
	 * Adds different input fields to allow the user to change and customize the widget settings.
	 *
	 * @since  1.0.0
	 * @access protected
	 */
	protected function register_controls() {

		$this->start_controls_section(
			'home1-about-content',
			[
				'label' => esc_html__( 'About Content', 'geroz-core' ),
			]
		);	

		$this->add_control(
			'image',
			[
				'label' => esc_html__( 'Image', 'geroz-core' ),
				'type' => Controls_Manager::MEDIA,
				'default' => [
					'url' => Utils::get_placeholder_image_src(),
				],
			]
		);

		$this->add_control(
			'subtitle',
			[
				'label' => esc_html__( 'Subtitle', 'geroz-core' ),
				'type' => Controls_Manager::TEXTAREA,
				'default' => esc_html__( 'About Us', 'geroz-core' ),
				'placeholder' => esc_html__( 'Type your subtitle here', 'geroz-core' ),
			]
		);

		$this->add_control(
			'title',
			[
				'label' => esc_html__( 'Title', 'geroz-core' ),
				'type' => Controls_Manager::TEXTAREA,
				'default' => esc_html__( 'We are here to help you', 'geroz-core' ),
				'placeholder' => esc_html__( 'Type your title here', 'geroz-core' ),
			]
		);

		$this->add_control(
			'text',
			[
				'label' => esc_html__( 'Text', 'geroz-core' ),
				'type' => Controls_Manager::TEXTAREA,
				'default' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'geroz-core' ),
				'placeholder' => esc_html__( 'Type your text here', 'geroz-core' ),
			]
		);

		$this->add_control(
			'button',
			[
				'label' => esc_html__( 'Button Text', 'geroz-core' ),
				'type' => Controls_Manager::TEXT,
				'default' => esc_html__( 'Learn More', 'geroz-core' ),
				'placeholder' => esc_html__( 'Type your button text here', 'geroz-core' ),
			]
		);

		$this->add_control(
			'button_link',
			[
				'label' => esc_html__( 'Button Link', 'geroz-core' ),
				'type' => Controls_Manager::URL,
				'placeholder' => esc_html__( 'https://your-link.com', 'geroz-core' ),
				'show_external' => true,
				'default' => [
					'url' => '',
					'is_external' => true,
					'nofollow' => true,
				],
			]
		);

		$this->end_controls_section();

		// Tab Start - 3

		$this->start_controls_section(
			'content_section',
			[
				'label' => __( 'Block', 'geroz-core' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);
		$this->add_control(
		  'repeat', 
			[
				'type' => Controls_Manager::REPEATER,
				'separator' => 'before',
				'default' => 
					[
						['counter_title' => esc_html__('Hello World', 'geroz-core')],
					],
				'fields' => 
					[	
						[
							'name' => 'counter_title',
							'label' => esc_html__( 'Block Title', 'geroz-core' ),
							'type' => Controls_Manager::TEXTAREA,
							'default' => esc_html__( 'Block Title', 'geroz-core' ),
							'placeholder' => esc_html__( 'Type your block title here', 'geroz-core' ),
						],

						[
							'name' => 'counter_text',
							'label' => esc_html__( 'Block Text', 'geroz-core' ),
							'type' => Controls_Manager::TEXTAREA,
							'default' => esc_html__( 'This is a block text.', 'geroz-core' ),
							'placeholder' => esc_html__( 'Type your block text here', 'geroz-core' ),
						],
						
					],
				'title_field' => '{{counter_title}}',
			 ]
	);
		
		
	$this->end_controls_section();	



			// ===== Tab Start - 4: Section Sub Title Settings =====

		$this->start_controls_section(
			'section_subtitle_settings',
			[
				'label' => __( 'Section Sub Title Setting', 'geroz-core' ),
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			]
		);

		$this->add_control(
			'show_section_subtitle',
			[
				'label'   => esc_html__( 'Show Section Sub Title', 'geroz-core' ),
				'type'    => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'title' => esc_html__( 'Show', 'geroz-core' ),
						'icon'  => 'eicon-check-circle',
					],
					'none' => [
						'title' => esc_html__( 'Hide', 'geroz-core' ),
						'icon'  => 'eicon-close-circle',
					],
				],
				'default'   => 'show',
				'selectors' => [
					'{{WRAPPER}} .section-title .sub-title span' => 'display: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'section_subtitle_alignment',
			[
				'label'     => esc_html__( 'Alignment', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::CHOOSE,
				'options'   => [
					'left' => [
						'title' => esc_html__( 'Left', 'geroz-core' ),
						'icon'  => 'eicon-text-align-left',
					],
					'center' => [
						'title' => esc_html__( 'Center', 'geroz-core' ),
						'icon'  => 'eicon-text-align-center',
					],
					'right' => [
						'title' => esc_html__( 'Right', 'geroz-core' ),
						'icon'  => 'eicon-text-align-right',
					],
				],
				'toggle'    => true,
				'condition' => [ 'show_section_subtitle' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .section-title .sub-title span' => 'text-align: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'section_subtitle_margin',
			[
				'label'      => __( 'Margin', 'geroz-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_section_subtitle' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .section-title .sub-title span' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_control(
			'section_subtitle_padding',
			[
				'label'      => __( 'Padding', 'geroz-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_section_subtitle' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .section-title .sub-title span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			[
				'name'      => 'section_subtitle_typography',
				'label'     => __( 'Typography', 'geroz-core' ),
				'selector'  => '{{WRAPPER}} .section-title .sub-title span',
				'condition' => [ 'show_section_subtitle' => 'show' ],
			]
		);

		$this->add_control(
			'section_subtitle_color',
			[
				'label'     => __( 'Color', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'separator' => 'after',
				'condition' => [ 'show_section_subtitle' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .section-title .sub-title span' => 'color: {{VALUE}} !important',
				],
			]
		);

		$this->end_controls_section();

		// ===== End Tab - 4: Section Sub Title Settings =====


				// Section Title ==================
		$this->start_controls_section(
			'section_title_settings',
			[
				'label' => __( 'Section Title Setting', 'geroz-core' ),
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			]
		);

		$this->add_control(
			'show_section_title',
			[
				'label'   => esc_html__( 'Show Section Title', 'geroz-core' ),
				'type'    => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'title' => esc_html__( 'Show', 'geroz-core' ),
						'icon'  => 'eicon-check-circle',
					],
					'none' => [
						'title' => esc_html__( 'Hide', 'geroz-core' ),
						'icon'  => 'eicon-close-circle',
					],
				],
				'default'   => 'show',
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .title' => 'display: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'section_title_alignment',
			[
				'label'     => esc_html__( 'Alignment', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::CHOOSE,
				'options'   => [
					'left' => [
						'title' => esc_html__( 'Left', 'geroz-core' ),
						'icon'  => 'eicon-text-align-left',
					],
					'center' => [
						'title' => esc_html__( 'Center', 'geroz-core' ),
						'icon'  => 'eicon-text-align-center',
					],
					'right' => [
						'title' => esc_html__( 'Right', 'geroz-core' ),
						'icon'  => 'eicon-text-align-right',
					],
				],
				'toggle'    => true,
				'condition' => [ 'show_section_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .title' => 'text-align: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'section_title_margin',
			[
				'label'      => __( 'Margin', 'geroz-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_section_title' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .about-1 .about-content .title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_control(
			'section_title_padding',
			[
				'label'      => __( 'Padding', 'geroz-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_section_title' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .about-1 .about-content .title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			[
				'name'      => 'section_title_typography',
				'label'     => __( 'Typography', 'geroz-core' ),
				'selector'  => '{{WRAPPER}} .about-1 .about-content .title',
				'condition' => [ 'show_section_title' => 'show' ],
			]
		);

		$this->add_control(
			'section_title_color',
			[
				'label'     => __( 'Color', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'condition' => [ 'show_section_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .title' => 'color: {{VALUE}} !important',
				],
			]
		);

		$this->end_controls_section();
		// End of Title ==================

		
		// ===== Tab Start - 5: Title Settings =====

		$this->start_controls_section(
			'title_settings',
			[
				'label' => __( 'Title Setting', 'geroz-core' ),
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			]
		);

		$this->add_control(
			'show_title',
			[
				'label'   => esc_html__( 'Show Title', 'geroz-core' ),
				'type'    => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'title' => esc_html__( 'Show', 'geroz-core' ),
						'icon'  => 'eicon-check-circle',
					],
					'none' => [
						'title' => esc_html__( 'Hide', 'geroz-core' ),
						'icon'  => 'eicon-close-circle',
					],
				],
				'default'   => 'show',
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .info-area h2' => 'display: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'title_alignment',
			[
				'label'     => esc_html__( 'Alignment', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::CHOOSE,
				'options'   => [
					'left' => [
						'title' => esc_html__( 'Left', 'geroz-core' ),
						'icon'  => 'eicon-text-align-left',
					],
					'center' => [
						'title' => esc_html__( 'Center', 'geroz-core' ),
						'icon'  => 'eicon-text-align-center',
					],
					'right' => [
						'title' => esc_html__( 'Right', 'geroz-core' ),
						'icon'  => 'eicon-text-align-right',
					],
				],
				'toggle'    => true,
				'condition' => [ 'show_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .info-area h2' => 'text-align: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'title_margin',
			[
				'label'      => __( 'Margin', 'geroz-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_title' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .about-1 .about-content .info-area h2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_control(
			'title_padding',
			[
				'label'      => __( 'Padding', 'geroz-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_title' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .about-1 .about-content .info-area h2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			[
				'name'      => 'title_typography',
				'label'     => __( 'Typography', 'geroz-core' ),
				'selector'  => '{{WRAPPER}} .about-1 .about-content .info-area h2',
				'condition' => [ 'show_title' => 'show' ],
			]
		);

		$this->add_control(
			'title_color',
			[
				'label'     => __( 'Color', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'condition' => [ 'show_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .info-area h2' => 'color: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'title_hover_color',
			[
				'label'     => __( 'Hover Color', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'condition' => [ 'show_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .about-1 .about-content .info-area h2:hover' => 'color: {{VALUE}} !important',
				],
			]
		);

		$this->end_controls_section();

		// ===== End Tab - 5: Title Settings =====

		//Text==========================
		$this->start_controls_section(
			'text_settings',
			array(
				'label' => __( 'Text Setting', 'geroz-core' ),
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			)
		); 
		
		$this->add_control(
			'show_text',
			array(
				'label' => esc_html__( 'Show Text', 'geroz-core' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'show' => esc_html__( 'Show', 'geroz-core' ),	
						'icon' => 'eicon-check-circle',
					],
					'none' => [
						'none' => esc_html__( 'Hide', 'geroz-core' ),
						'icon' => 'eicon-close-circle',
					],
				],
				'default' => 'show',
				'selectors' => array(
					'{{WRAPPER}} .about-1 .about-content .info-area p' => 'display: {{VALUE}} !important',
				),   
			)
		);
		
		$this->add_control(
			'text_alignment',
			array(
				'label' => esc_html__( 'Alignment', 'geroz-core' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'left' => [
						'title' => esc_html__( 'Left', 'geroz-core' ),
						'icon' => 'eicon-text-align-left',
					],
					'center' => [
						'title' => esc_html__( 'Center', 'geroz-core' ),
						'icon' => 'eicon-text-align-center',
					],
					'right' => [
						'title' => esc_html__( 'Right', 'geroz-core' ),
						'icon' => 'eicon-text-align-right',
					],
				],
				'condition'    => array( 'show_text' => 'show' ),
				'toggle' => true,
				'selectors' => array(
					'{{WRAPPER}} .about-1 .about-content .info-area p' => 'text-align: {{VALUE}} !important',
				), 
			)
		);
		
		$this->add_control(
			'text_margin',
			array(
				'label'     => __( 'Margin', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' =>  ['px', '%', 'em' ],
				'condition'    => array( 'show_text' => 'show' ),
				'selectors' => array(
					'{{WRAPPER}} .about-1 .about-content .info-area p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);
		
		$this->add_control(
			'text_padding',
			array(
				'label'     => __( 'Padding', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' =>  ['px', '%', 'em' ],
				'condition'    => array( 'show_text' => 'show' ),
				'selectors' => array(
					'{{WRAPPER}} .about-1 .about-content .info-area p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);
		
		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			array(
				'name'     => 'text_typography',
				'condition'    => array( 'show_text' => 'show' ),
				'label'    => __( 'Typography', 'geroz-core' ),
				'selector' => '{{WRAPPER}} .about-1 .about-content .info-area p',
			)
		); 
		
		$this->add_control(
			'text_color',
			array(
				'label'     => __( 'Color', 'geroz-core' ),
				'condition'    => array( 'show_text' => 'show' ),
				'separator' => 'after',
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .about-1 .about-content .info-area p' => 'color: {{VALUE}} !important',
				),
			)
		);

		$this->add_control(
			'text_hover_color',
			array(
				'label'     => __( 'Hover Color', 'geroz-core' ),
				'condition'    => array( 'show_text' => 'show' ),
				'separator' => 'after',
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .about-1 .about-content .info-area p:hover' => 'color: {{VALUE}} !important',
				),
			)
		);

		$this->end_controls_section();
		//End of Text=========	


		//========== Button with Background ===================================

		$this->start_controls_section(
			'button_control',
			array(
				'label' => __( 'Button Settings', 'geroz-core' ),
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			)
		);
		
		$this->add_control(
			'show_button',
			array(
				'label' => esc_html__( 'Show Button', 'geroz-core' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'show' => esc_html__( 'Show', 'geroz-core' ),	
						'icon' => 'eicon-check-circle',
					],
					'none' => [
						'none' => esc_html__( 'Hide', 'geroz-core' ),
						'icon' => 'eicon-close-circle',
					],
				],
				'default' => 'show',
				'selectors' => array(
					'{{WRAPPER}} .circle' => 'display: {{VALUE}} !important',
				),
			)
		);		
		$this->add_control(
			'button_alingment',
			array(
				'label' => esc_html__( 'Alignment', 'geroz-core' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'condition'    => array( 'show_button' => 'show' ),
				'options' => [
					'left' => [
						'title' => esc_html__( 'Left', 'geroz-core' ),
						'icon' => 'eicon-text-align-left',
					],
					'center' => [
						'title' => esc_html__( 'Center', 'geroz-core' ),
						'icon' => 'eicon-text-align-center',
					],
					'right' => [
						'title' => esc_html__( 'Right', 'geroz-core' ),
						'icon' => 'eicon-text-align-right',
					],
				],
				'toggle' => true,
				'selectors' => array(
					'{{WRAPPER}} .circle-text' => 'text-align: {{VALUE}} !important',
				),
			)
		);	
		$this->add_control(
			'button_color',
			array(
				'label'     => __( 'Button Color', 'geroz-core' ),
				'condition'    => array( 'show_button' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .circle-text' => 'color: {{VALUE}} !important',

				),
			)
		);
		$this->add_control(
			'button_bg_color',
			array(
				'label'     => __( 'Background Color', 'geroz-core' ),
				'condition'    => array( 'show_button' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .circle-text' => 'background: {{VALUE}} !important',
				),
			)
		);	
		$this->add_control(
			'button_hover_color',
			array(
				'label'     => __( 'Hover Color', 'geroz-core' ),
				'condition'    => array( 'show_button' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .circle-text' => 'background: {{VALUE}} !important',
				),
			)
		);				
		$this->add_control(
			'button_padding',
			array(
				'label'     => __( 'Padding', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'condition'    => array( 'show_button' => 'show' ),
				'size_units' =>  ['px', '%', 'em' ],
			
				'selectors' => array(
					'{{WRAPPER}} .circle-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);

		$this->add_control(
			'button_margin',
			array(
				'label'     => __( 'Margin', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'condition'    => array( 'show_button' => 'show' ),
				'size_units' =>  ['px', '%', 'em' ],
				'selectors' => array(
					'{{WRAPPER}} .circle-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);

		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			array(
				'name'     => 'button_typography',
				'condition'    => array( 'show_button' => 'show' ),
				'label'    => __( 'Typography', 'geroz-core' ),
				'selector' => '{{WRAPPER}} .theme-btn',
			)
		);
		$this->add_group_control(
			\Elementor\Group_Control_Border::get_type(),
			array(
				'name' => 'border',
				'condition'    => array( 'show_button' => 'show' ),
				'selector' => '{{WRAPPER}} .theme-btn',
			)
		);
		$this->add_control(
			'border_radius',
			array(
				'label' => esc_html__( 'Border Radius', 'geroz-core' ),
				'type' => \Elementor\Controls_Manager::SLIDER,
				'condition'    => array( 'show_button' => 'show' ),
				'size_units' => [ 'px', '%' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 1000,
						'step' => 5,
					],
					'%' => [
						'min' => 0,
						'max' => 100,
					],
				],
				'selectors' => [
					'{{WRAPPER}} .circle-text' => 'border-radius: {{SIZE}}{{UNIT}};',
				],
			)
		);

		$this->end_controls_section();
		
		//End of Button	



	
		}

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


		   <section class="about-wrapper about-1">
                <div class="about-arrow">
                    <svg width="221" height="231" viewBox="0 0 221 231" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path class="arrow-path"
                            d="M19.5391 230.256C-23.4734 146.16 16.1024 15.262 85.7648 82.9955C129.24 125.267 25.8908 112.384 61.9046 58.117C90.7158 14.7032 173.195 9.5528 210.833 12.4046L186.879 31.6248C197.154 26.8738 217.92 16.4044 218.787 12.5339C219.654 8.66335 196.252 4.00447 184.442 2.15841"
                            stroke="currentColor" stroke-width="3" />
                    </svg>
                </div>
                <div class="shape">
                <?php  if ( !empty(esc_url($settings['image']['id']) )) : ?>   
					<img class="shape-1" src="<?php echo wp_get_attachment_url($settings['image']['id']);?>" alt=""/>
				<?php endif;?>
                </div>
                <div class="container">
                    <div class="row">
                        <div class="col-xl-4">
                            <div class="section-title">
                                <div class="sub-title">
                                    <div class="dot"></div> <span><?php echo $settings['subtitle'];?></span>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-8 col-lg-12 col-12">
                            <div class="about-content ">
                                <h3 class="title wow fadeInUp" data-wow-delay="600ms"><?php echo $settings['title'];?></h3>
                                <div class="has_text_move_anim">
                                    <p class="text mt-4 ">
                                      <?php echo $settings['text'];?>
                                    </p>
                                </div>

                                <div class="info-area">
									<?php foreach($settings['repeat'] as $item):?>	
                                    <div class="info-text has_fade_anim" data-fade-from="left">
                                        <h2><?php echo wp_kses($item['counter_text'], $allowed_tags);?></h2>
                                        <p><?php echo wp_kses($item['counter_title'], $allowed_tags);?></p>
                                    </div>
									<?php endforeach; ?>
                                    <a href="<?php echo esc_url($settings['button_link']['url']);?>" class="circle wow fadeInLeft"
                                        data-wow-delay="600ms">
                                        <div class="dot"></div>
                                        <div class="circle-icon"><i class="far fa-long-arrow-right"></i></div>
                                        <div class="circle-text">
                                            <p>
                                                <?php echo $settings['button'];?>
                                            </p>
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

             
		<?php 
	}


}

Plugin::instance()->widgets_manager->register_widget_type(new Home1_About());