<?php
namespace Elementor;

/**
 * Elementor Widget
 * @package Geroz
 * @since 1.0.0
 */ 
 
class Home1_Hero 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-hero-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 Hero', '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() {

		// Tab Start - 1

		$this->start_controls_section(
			'home1-hero-images',
			[
				'label' => esc_html__( 'Hero Section Images', 'geroz-core' ),
			]
		);		

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

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

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

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

		$this->end_controls_section();

// Tab Start - 2

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

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

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

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

		$this->add_control(
			'year_count',
			[
				'label' => esc_html__( 'Year Count', 'geroz-core' ),
				'type' => Controls_Manager::TEXTAREA,
				'default' => esc_html__( '10', 'geroz-core' ),
				'placeholder' => esc_html__( 'Type your year count here', 'geroz-core' ),
			]
		);

		$this->add_control(
			'year_text',
			[
				'label' => esc_html__( 'Year Text', 'geroz-core' ),
				'type' => Controls_Manager::TEXTAREA,
				'default' => esc_html__( 'Years of Experience', 'geroz-core' ),
				'placeholder' => esc_html__( 'Type your year 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' => 
					[
						['block_title' => esc_html__('Hello World', 'geroz-core')],
					],
				'fields' => 
					[	
						[
							'name' => 'section_icons',
							'label' => __( 'Icon', 'geroz-core' ),
							'type' => Controls_Manager::ICONS,
							'default' => [
								'value' => 'fa fa-facebook-f',
								'library' => 'fa-solid',
							],
						],
						[
							'name' => 'section_button_link',
							'label' => __( 'Link', 'geroz-core' ),
							'type' => Controls_Manager::URL,
							'placeholder' => __( 'https://your-link.com', 'geroz-core' ),
							'show_external' => true,
							'default' => [
								'url' => '',
								'is_external' => true,
								'nofollow' => true,
							],
						],
						
					],
				'title_field' => '{{block_title}}',
			 ]
	);
		
		
	$this->end_controls_section();	



	// =======================================
	// Section Controls - Style Settings Start
	// =======================================


	// 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}} .hero-1 .hero-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}} .text_invert > div' => '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}} .text_invert > div' => '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}} .text_invert > div' => '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}} .text_invert > div',
			'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}} .text_invert > div' => 'color: {{VALUE}} !important',
			],
		]
	);

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


	// ===== 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}} .hero-1 .hero-content .text' => '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}} .hero-1 .hero-content .text' => '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}} .hero-1 .hero-content .text' => '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}} .hero-1 .hero-content .text' => '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}} .hero-1 .hero-content .text',
			'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}} .hero-1 .hero-content .text' => 'color: {{VALUE}} !important',
			],
		]
	);

	$this->end_controls_section();

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


	// ===== 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}} .hero-1 .hero-image .hero-experiance h4' => '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}} .hero-1 .hero-image .hero-experiance h4' => '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}} .hero-1 .hero-image .hero-experiance h4' => '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}} .hero-1 .hero-image .hero-experiance h4' => '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}} .hero-1 .hero-image .hero-experiance h4',
			'condition' => [ 'show_title' => 'show' ],
		]
	);

	$this->add_control(
		'title_color',
		[
			'label'     => __( 'Color', 'geroz-core' ),
			'type'      => \Elementor\Controls_Manager::COLOR,
			'condition' => [ 'show_title' => 'show' ],
			'selectors' => [
				'{{WRAPPER}} .hero-1 .hero-image .hero-experiance h4' => '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}} .hero-1 .hero-image .hero-experiance h4:hover' => 'color: {{VALUE}} !important',
			],
		]
	);

	$this->end_controls_section();

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

	//Sub Title	==================	
	

		$this->start_controls_section(
			'subtitle_settings',
			array(
				'label' => __( 'Sub Title Setting', 'geroz-core' ),
			
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			)
		);
	
	$this->add_control(
			'show_subtitle',
			array(
				'label' => esc_html__( 'Show Sub Title', '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}} .hero-1 .hero-image .hero-experiance p' => 'display: {{VALUE}} !important',
				),  
			)
		);	
	$this->add_control(
			'subtitle_alingment',
			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_subtitle' => 'show' ),
				'toggle' => true,
				'selectors' => array(
				
					'{{WRAPPER}} .hero-1 .hero-image .hero-experiance p' => 'text-align: {{VALUE}} !important',
				),
			)
		);	
	$this->add_control(
			'subtitle_padding',
			array(
				'label'     => __( 'Padding', 'geroz-core' ),
				'condition'    => array( 'show_subtitle' => 'show' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' =>  ['px', '%', 'em' ],
			
				'selectors' => array(
			'{{WRAPPER}} .hero-1 .hero-image .hero-experiance p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',		
				),
			)
		);
		$this->add_control(
			'subtitle_margin',
			array(
				'label'     => __( 'Margin', 'geroz-core' ),
				'condition'    => array( 'show_subtitle' => 'show' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' =>  ['px', '%', 'em' ],
			
				'selectors' => array(
			'{{WRAPPER}} .hero-1 .hero-image .hero-experiance p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',		
				),
			)
		);
		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
		
			array(
				'name'     => 'subtitle_typography',
				'condition'    => array( 'show_subtitle' => 'show' ),
				'label'    => __( 'Typography', 'geroz-core' ),
				'selector' => '{{WRAPPER}} .hero-1 .hero-image .hero-experiance p',
			)
		);
		
		
		$this->add_control(
			'subtitle_color',
			array(
				'label'     => __( 'Color', 'geroz-core' ),
				'condition'    => array( 'show_subtitle' => 'show' ),
				'separator' => 'after',
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .hero-1 .hero-image .hero-experiance p' => 'color: {{VALUE}} !important',
				),
			
			)
		);

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

		//========== 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}} .hero-1 .hero-image .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}} .hero-1 .hero-image .circle .dot' => '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}} .hero-1 .hero-image .circle-text span' => '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}} .hero-1 .hero-image .circle .dot' => '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}} .hero-1 .hero-image .circle .dot' => '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}} .hero-1 .hero-image .circle .dot' => '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}} .hero-1 .hero-image .circle .dot' => '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}} .hero-1 .hero-image .circle .dot' => 'border-radius: {{SIZE}}{{UNIT}};',
				],
			)
		);

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

		//========== icon Settings===================================
		
		$this->start_controls_section(
			'icon_control',
			array(
				'label' => __( 'Icon Settings', 'geroz-core' ),
				'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
			)
		);
		
		$this->add_control(
			'show_icon',
			array(
				'label' => esc_html__( 'Show Icon', '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}} .hero-1 .hero-content .social a' => 'display: {{VALUE}} !important',
				),
			)
		);
		
		$this->add_control(
			'icon_alingment',
			array(
				'label' => esc_html__( 'Alignment', 'geroz-core' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'condition'    => array( 'show_icon' => '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}} .hero-1 .hero-content .social a' => 'text-align: {{VALUE}} !important',
				),
			)
		);	
		
		$this->add_control(
			'icon_color',
			array(
				'label'     => __( ' Color', 'geroz-core' ),
				'condition'    => array( 'show_icon' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .hero-1 .hero-content .social a' => 'color: {{VALUE}} !important',

				),
			)
		);
		
		$this->add_control(
			'icon_bgcolor',
			array(
				'label'     => __( 'Background Color', 'geroz-core' ),
				'condition'    => array( 'show_icon' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .hero-1 .hero-content .social a' => 'background: {{VALUE}} !important',

				),
			)
		);
		
		
		$this->add_control(
			'icon_hover_color',
			array(
				'label'     => __( 'Hover Color', 'geroz-core' ),
				'condition'    => array( 'show_icon' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .hero-1 .hero-content .social a:hover' => 'color: {{VALUE}} !important',

				),
			)
		);
		
		$this->add_control(
			'icon_hover_bgcolor',
			array(
				'label'     => __( 'Background Hover Color', 'geroz-core' ),
				'condition'    => array( 'show_icon' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .hero-1 .hero-content .social a:hover' => 'background: {{VALUE}} !important',

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

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

		$this->add_group_control(
			\Elementor\Group_Control_Typography::get_type(),
			array(
				'name'     => 'icon_typography',
				'condition'    => array( 'show_icon' => 'show' ),
				'label'    => __( 'Typography', 'geroz-core' ),
				'selector' => '{{WRAPPER}} .hero-1 .hero-content .social a',
			)
		);
		
		$this->add_group_control(
			\Elementor\Group_Control_Border::get_type(),
			array(
				'name' => 'icon_border',
				'condition'    => array( 'show_icon' => 'show' ),
				'selector' => '{{WRAPPER}} .hero-1 .hero-content .social a',
			)
		);
		
		$this->add_control(
			'icon_border_radius',
			array(
				'label'     => __( 'Icon Border Radius', 'geroz-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'condition'    => array( 'show_icon' => 'show' ),
				'size_units' =>  ['px', '%', 'em' ],
			
				'selectors' => array(
					'{{WRAPPER}} .hero-1 .hero-content .social a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);


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


	
		}

	/**
	 * 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="hero-wrapper hero-1">
			<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 class="shape-2"></div>
				<?php  if ( !empty(esc_url($settings['image2']['id']) )) : ?>   
					<img class="shape-3" src="<?php echo wp_get_attachment_url($settings['image2']['id']);?>" alt=""/>
				<?php endif;?>
			</div>
			<div class="container-fluid">
				<div class="row align-items-center">
					<div class="col-xl-5 col-lg-12">
						<div class="hero-content d-flex">
							<div class="social">
								<?php foreach($settings['repeat'] as $item):?>									
								<a href="<?php echo esc_url($item['section_button_link']['url']);?>" class="wow fadeInLeft" data-wow-delay="400ms"><i
										class="<?php echo str_replace("icon ", " ", esc_attr( $item['section_icons']['value']));?>"></i></a>
								<?php endforeach; ?>
							</div>
							<div class="has_text_move_anim">
								<h3 class="text p-rel ">
									<?php  if ( !empty(esc_url($settings['image3']['id']) )) : ?>   
										<img class="shape-4" src="<?php echo wp_get_attachment_url($settings['image3']['id']);?>" alt=""/>
									<?php endif;?>
									<?php echo $settings['subtitle'];?>
								</h3>
							</div>
						</div>
					</div>
					<div class="col-xl-7 col-lg-12">
						<div class="hero-image d-flex align-items-center">
							<div class="image p-rel has_fade_anim" data-fade-from="top" data-ease="bounce"
								data-fade-offset="100">
								<?php  if ( !empty(esc_url($settings['image4']['id']) )) : ?>   
									<img src="<?php echo wp_get_attachment_url($settings['image4']['id']);?>" alt=""/>
								<?php endif;?>
								<div class="shape-3">
									<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['text'];?>
											</p>
										</div>
									</a>
								</div>
							</div>
							<div class="hero-experiance  wow fadeInUp" data-wow-delay="400ms">
								<h4><?php echo $settings['year_count'];?></h4>
								<p><?php echo $settings['year_text'];?></p>
							</div>
						</div>
					</div>
				</div>

			</div>
			<h1 class="hero-title wow fadeInUp text_invert" data-wow-delay="600ms">
				<?php echo $settings['title'];?>
			</h1>
		</section>

             
		<?php 
	}


}

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