<?php
namespace Elementor;

/**
 * Elementor Widget
 * @package Feron
 * @since 1.0.0
 */ 
 
class Game_Logo_Slider 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 'feron-game-logo-slider-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__( 'Game logo slider', 'feron-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 ['feron_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 - 2

		$this->start_controls_section(
			'game_logo_slider',
			[
				'label' => esc_html__( 'Game logo slider', 'feron-core' ),
			]
		);		

		$this->add_control(
			'style',
			[
				'label'   => esc_html__( 'Select Style', 'feron-core' ),
				'type'    => Controls_Manager::SELECT,
				'default' => 'style1',
				'options' => array(
					'style1'   => esc_html__( 'Style One', 'feron-core' ),
					'style2'   => esc_html__( 'Style Two', 'feron-core' ),
					'style3'   => esc_html__( 'Style Three', 'feron-core' ),
					'style4'   => esc_html__( 'Style Four', 'feron-core' ),
				),
			]
		);

		$this->add_control(
			'subtitle',
			[
				'label'       => __( 'subtitle', 'feron-core' ),
				'type'        => Controls_Manager::TEXTAREA,
				'dynamic'     => [
					'active' => true,
				],
				'placeholder' => __( 'Enter your subtitle', 'feron-core' ),
			]
		);	
		
		$this->add_control(
			'title',
			[
				'label'       => __( 'Title', 'feron-core' ),
				'type'        => Controls_Manager::TEXTAREA,
				'dynamic'     => [
					'active' => true,
				],
				'placeholder' => __( 'Enter your title', 'feron-core' ),
			]
		);

		$this->add_control(
			'button',
			[
				'label'       => __( 'Button', 'feron-core' ),
				'type'        => Controls_Manager::TEXT,
				'dynamic'     => [
					'active' => true,
				],
				'placeholder' => esc_html__( 'Enter your button text', 'feron-core' ),
				'default' => esc_html__('Read More', 'feron-core'),
			]
		);

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

		$this->add_control(
			'button2',
			[
				'label'       => __( 'Button 2', 'feron-core' ),
				'type'        => Controls_Manager::TEXT,
				'dynamic'     => [
					'active' => true,
				],
				'placeholder' => esc_html__( 'Enter your button text', 'feron-core' ),
				'default' => esc_html__('Read More', 'feron-core'),
			]
		);

		$this->add_control(
			'button_link2',
			[
			  'label' => __( 'Button Url 2', 'feron-core' ),
			  'type' => Controls_Manager::URL,
			  'placeholder' => __( 'https://your-link.com', 'feron-core' ),
			  'show_external' => true,
			  'default' => [
				'url' => '',
				'is_external' => true,
				'nofollow' => true,
			  ],
			
		   ]
		);	

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

		$this->end_controls_section();

		// Tab Start - 3

		$this->start_controls_section(
			'section_number_content',
			[
				'label' => esc_html__( 'Section Image', 'feron-core' ),
			]
		);
		$this->add_control(
			'repeat',
			[
				'label' => esc_html__( 'Create New', 'feron-core' ),
				'type' => Controls_Manager::REPEATER,
				'fields' => [
					[
						'name' => 'section_image',
						'label' => esc_html__( 'Image', 'feron-core' ),
						'type' => Controls_Manager::MEDIA,
						'default' => [
							'url' => Utils::get_placeholder_image_src(),
						],
					],	
				],
				'title_field' => '{{{ section_image.url }}}',
			]
		);

		$this->end_controls_section();


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

				),
			)
		);

		$this->add_control(
			'button_bg_color',
			array(
				'label'     => __( 'Button Background Color', 'feron-core' ),
				'condition'    => array( 'show_button' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .theme-btn' => 'background: {{VALUE}} !important',

				),
			)
		);

		$this->add_control(
			'button_hover_color',
			array(
				'label'     => __( 'Button Hover Color', 'feron-core' ),
				'condition'    => array( 'show_button' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .theme-btn:hover' => 'color: {{VALUE}} !important',

				),
			)
		);
		
		
		$this->add_control(
			'button_bg_hover_color',
			array(
				'label'     => __( 'Button Background Hover Color', 'feron-core' ),
				'condition'    => array( 'show_button' => 'show' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'selectors' => array(
					'{{WRAPPER}} .theme-btn:hover' => 'background: {{VALUE}} !important',

				),
			)
		);
		
		$this->add_control(
			'button_padding',
			array(
				'label'     => __( 'Padding', 'feron-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'condition'    => array( 'show_button' => 'show' ),
				'size_units' =>  ['px', '%', 'em' ],
			
				'selectors' => array(
					'{{WRAPPER}} .theme-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);

		$this->add_control(
			'button_margin',
			array(
				'label'     => __( 'Margin', 'feron-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'condition'    => array( 'show_button' => 'show' ),
				'size_units' =>  ['px', '%', 'em' ],
				'selectors' => array(
					'{{WRAPPER}} .theme-btn' => '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', 'feron-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'     => __( 'Border Radius', 'feron-core' ),
				'type'      => \Elementor\Controls_Manager::DIMENSIONS,
				'condition'    => array( 'show_button' => 'show' ),
				'size_units' =>  ['px', '%', 'em' ],
			
				'selectors' => array(
					'{{WRAPPER}} .theme-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important',
				),
			)
		);

		$this->end_controls_section();
		
		//End of Button		
	
				// ===== Tab Start - 5: Title Settings =====

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

		$this->add_control(
			'show_title',
			[
				'label'   => esc_html__( 'Show Title', 'feron-core' ),
				'type'    => \Elementor\Controls_Manager::CHOOSE,
				'options' => [
					'show' => [
						'title' => esc_html__( 'Show', 'feron-core' ),
						'icon'  => 'eicon-check-circle',
					],
					'none' => [
						'title' => esc_html__( 'Hide', 'feron-core' ),
						'icon'  => 'eicon-close-circle',
					],
				],
				'default'   => 'show',
				'selectors' => [
					'{{WRAPPER}} .marque-section .download-app h5' => 'display: {{VALUE}} !important',
				],
			]
		);

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

		$this->add_control(
			'title_margin',
			[
				'label'      => __( 'Margin', 'feron-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_title' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .marque-section .download-app h5' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
				],
			]
		);

		$this->add_control(
			'title_padding',
			[
				'label'      => __( 'Padding', 'feron-core' ),
				'type'       => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'condition'  => [ 'show_title' => 'show' ],
				'selectors'  => [
					'{{WRAPPER}} .marque-section .download-app h5' => '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', 'feron-core' ),
				'selector'  => '{{WRAPPER}} .marque-section .download-app h5',
				'condition' => [ 'show_title' => 'show' ],
			]
		);

		$this->add_control(
			'title_color',
			[
				'label'     => __( 'Color', 'feron-core' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'condition' => [ 'show_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .marque-section .download-app h5' => 'color: {{VALUE}} !important',
				],
			]
		);

		$this->add_control(
			'title_hover_color',
			[
				'label'     => __( 'Hover Color', 'feron-core' ),
				'type'      => \Elementor\Controls_Manager::COLOR,
				'condition' => [ 'show_title' => 'show' ],
				'selectors' => [
					'{{WRAPPER}} .marque-section .download-app h5:hover' => 'color: {{VALUE}} !important',
				],
			]
		);

		$this->end_controls_section();

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


	
		}

	/**
	 * 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');
		?>

		<?php  if ( 'style1' === $settings['style'] ) : ?>	
		
		  <div class="marque-section section-padding fix pb-0">
            <div class="gradient-shape">
                <?php  if ( !empty(esc_url($settings['image']['id']) )) : ?>   
					<img src="<?php echo wp_get_attachment_url($settings['image']['id']);?>" alt=""/>
				<?php endif;?>
            </div>
            <div class="marquee-wrapper text-slider">
                <div class="marquee-inner to-left">
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                     <ul class="marqee-list d-flex">

                    	<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                     <ul class="marqee-list d-flex">

                     	<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                     <ul class="marqee-list d-flex">

                       <?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                </div>
            </div>
            <div class="marquee-wrapper text-slider style-2 mt-3">
                <div class="marquee-inner to-right">
                    <ul class="marqee-list d-flex">

                       <?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                    <ul class="marqee-list d-flex">

                       <?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                    <ul class="marqee-list d-flex">

                      <?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                    <ul class="marqee-list d-flex">

                     <?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                               <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>

                    </ul>
                </div>
            </div>
            <div class="download-app wow fadeInUp" data-wow-delay=".3s">
                <h5>
                    <?php echo $settings['title'];?>
                </h5>
                <div class="download-btn">
                    <a href="<?php echo esc_url($settings['button_link']['url']);?>" class="theme-btn">
                        <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
                        <g clip-path="url(#clip0_138_191)">
                            <path d="M15.9578 0.000976562H4.03945C1.80742 0.000976562 0 1.8084 0 4.04043V15.9615C0 18.1912 1.80742 19.9986 4.03945 19.9986H15.9605C18.1902 19.9986 20 18.1912 20 15.9592V4.04043C19.9977 1.8084 18.1902 0.000976562 15.9578 0.000976562ZM5.5293 15.8342C5.2793 16.2717 4.72188 16.4189 4.28438 16.1689C3.84687 15.9189 3.69961 15.3615 3.94961 14.924L4.59961 13.7994C5.33437 13.5717 5.93164 13.7467 6.4043 14.3166L5.5293 15.8342ZM11.8484 13.3795H3.57461C3.06953 13.3795 2.66484 12.9744 2.66484 12.4693C2.66484 11.9646 3.06953 11.5596 3.57461 11.5596H5.89414L8.86406 6.4127L7.93633 4.80293C7.68672 4.36543 7.83398 3.81309 8.27148 3.55801C8.70898 3.30801 9.26133 3.45566 9.51641 3.89316L9.91367 4.59551L10.3188 3.89551C10.5688 3.45801 11.1262 3.31074 11.5637 3.56074C12.0012 3.81074 12.1484 4.36816 11.8984 4.80527L7.99648 11.5596H10.8187C11.7336 11.5596 12.2461 12.6346 11.8484 13.3795ZM16.3055 13.3846H14.9906L15.8781 14.924C16.1281 15.3615 15.9805 15.9143 15.543 16.1689C15.1055 16.4189 14.5531 16.2717 14.298 15.8342C12.8035 13.242 11.6809 11.3021 10.9363 10.01C10.1738 8.69512 10.7188 7.3752 11.2563 6.92754C11.8535 7.95254 12.7461 9.4998 13.9383 11.5646H16.3055C16.8105 11.5646 17.2152 11.9697 17.2152 12.4744C17.2152 12.9795 16.8105 13.3846 16.3055 13.3846Z" fill="#0B0E13"/>
                        </g>
                        <defs>
                            <clipPath id="clip0_138_191">
                            <rect width="20" height="20" fill="white"/>
                            </clipPath>
                        </defs>
                        </svg>
                        <?php echo $settings['button'];?>
                    </a>
                    <a href="<?php echo esc_url($settings['button_link2']['url']);?>" class="theme-btn">
                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 18 20" fill="none">
                            <path d="M17.1689 8.57424L2.46883 0.215808C2.2154 0.0718092 1.93325 0 1.65109 0C1.64535 0 1.6397 0.000761901 1.63405 0.000761901C1.59613 0.00114285 1.55832 0.0030476 1.52059 0.00599997C1.50355 0.0073333 1.4866 0.00914281 1.46956 0.0110476C1.44007 0.0142856 1.41068 0.0183809 1.38138 0.023238C1.37075 0.0250475 1.36003 0.0256189 1.3494 0.0276189L1.34998 0.0283808C1.16682 0.0619997 0.988069 0.12619 0.821955 0.222094C0.313176 0.515712 0 1.05657 0 1.64161V18.3584C0 18.9434 0.313176 19.4843 0.821955 19.7779C0.987974 19.8738 1.16673 19.9381 1.34988 19.9717L1.3494 19.9724C1.35898 19.9742 1.36865 19.9748 1.37813 19.9763C1.40963 19.9816 1.44122 19.986 1.47291 19.9893C1.48881 19.991 1.5046 19.9928 1.5205 19.994C1.55774 19.997 1.59489 19.9987 1.63223 19.9991C1.63855 19.9992 1.64477 20 1.65109 20C1.93325 20 2.2154 19.9282 2.46883 19.7842L17.1689 11.4257C17.6828 11.1334 18 10.5898 18 10.0007V10.0003V9.99995V9.99957V9.99919C18 9.41024 17.6828 8.86662 17.1689 8.57424ZM11.3555 6.91435L9.89391 8.82167L6.17524 3.96874L11.3555 6.91435ZM16.4561 10.1854L6.17524 16.0312L12.6124 7.63063L16.456 9.81605C16.5226 9.85386 16.5639 9.92471 16.5639 10.0006C16.5639 10.0768 16.5225 10.1477 16.4561 10.1854Z" fill="#0B0E13"/>
                        </svg>
                       <?php echo $settings['button2'];?>
                    </a>
                </div>
                
            </div>
            <div class="swiper line-slider">
                <div class="swiper-wrapper gt-slide-transtion">
                    <div class="swiper-slide gt-brand-slide-element">
                        <span class="line1"></span>
                    </div>
                     <div class="swiper-slide gt-brand-slide-element">
                        <span class="line1"></span>
                    </div>
                     <div class="swiper-slide gt-brand-slide-element">
                        <span class="line1"></span>
                    </div>
                    <div class="swiper-slide gt-brand-slide-element">
                        <span class="line1"></span>
                    </div>
                    <div class="swiper-slide gt-brand-slide-element">
                        <span class="line1"></span>
                    </div>
                    <div class="swiper-slide gt-brand-slide-element">
                        <span class="line1"></span>
                    </div>
                </div>
            </div>
        </div>


		<?php  elseif ( 'style2' === $settings['style'] ) : ?>	

		<div class="marque-section fix">
            <div class="marquee-wrapper text-slider">
                <div class="marquee-inner to-left">
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                                <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                                <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                                <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                                <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
									<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
								<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                </div>
            </div>
        </div>

		<?php  elseif ( 'style3' === $settings['style'] ) : ?>	

			 <div class="swiper brand-slider-4">
                <div class="swiper-wrapper">
					<?php foreach($settings['repeat'] as $item):?>	
                    <div class="swiper-slide">
                        <div class="brand-image-4">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                        </div>
                    </div>
					<?php endforeach; ?>
                </div>
            </div>

		<?php  elseif ( 'style4' === $settings['style'] ) : ?>	

		<!-- GT Webkit-text Section-4 Start -->

        <section class="gt-webkit-text-section section-padding pb-0 fix">
            <div class="container">
                <div class="row">
                    <div class="col-xl-12">
                        <div class="webkit-text-item">
                            <h4 class="post-box">
                               <?php echo $settings['subtitle'];?>
                            </h4>
                            <h2>
                                <?php echo $settings['title'];?>
                            </h2>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Marque Section Start -->
        <div class="marque-section section-padding fix pb-5">
            <div class="gradient-shape">
                <?php  if ( !empty(esc_url($settings['image']['id']) )) : ?>   
					<img src="<?php echo wp_get_attachment_url($settings['image']['id']);?>" alt=""/>
				<?php endif;?>
            </div>
            <div class="marquee-wrapper text-slider">
                <div class="marquee-inner to-left">
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                    <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                </div>
            </div>
            <div class="marquee-wrapper text-slider style-2 mt-3">
                <div class="marquee-inner to-right">
                     <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                     <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                     <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                     <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                     <ul class="marqee-list d-flex">
						<?php foreach($settings['repeat'] as $item):?>	
                        <li class="marquee-item">
                            <span class="text-slider">
                            <?php if(!empty(wp_get_attachment_url($item['section_image']['id']))): ?>
								<img src="<?php echo wp_get_attachment_url($item['section_image']['id']);?>" alt="">
							<?php endif;?>
                            </span>
                        </li>
						<?php endforeach; ?>
                    </ul>
                </div>
            </div>
        </div>

		<?php endif ;?>	

             
		<?php 
	}


}

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