<?php
namespace Elementor;

/**
 * Elementor Widget
 * @package Feron
 * @since 1.0.0
 */ 
 
class Team_Card_Vs 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-team-card-vs-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__( 'Team card vs', '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 - 1

		$this->start_controls_section(
			'team_card_vs',
			[
				'label' => esc_html__( 'Team Cta', 'feron-core' ),
			]
		);	

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

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

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

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

		$this->end_controls_section();


	
		}

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

	<div class="gt-match-details-wrapper m-0 p-0">
	<div class="gt-details-content m-0 p-0">
	<div class="gt-match-details-box">
		<div class="gt-list-item">
			<h4>
				<span>empire</span> team players
			</h4>
			<ul class="gt-list">
				<li>
					<i class="fa-solid fa-check"></i>
					Michael von
				</li>
				<li>
					<i class="fa-solid fa-check"></i>
					William david
				</li>
				<li>
					<i class="fa-solid fa-check"></i>
					Richard mia
				</li>
				<li>
					<i class="fa-solid fa-check"></i>
					Christopher kings
				</li>
			</ul>
		</div>
		<div class="gt-image-item">
			<div class="gt-small-image">
				<?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="gt-logo-image">
				<?php  if ( !empty(esc_url($settings['image2']['id']) )) : ?>   
	<img src="<?php echo wp_get_attachment_url($settings['image2']['id']);?>" alt=""/>
<?php endif;?>
			</div>
			<div class="gt-small-image">
				<?php  if ( !empty(esc_url($settings['image3']['id']) )) : ?>   
	<img src="<?php echo wp_get_attachment_url($settings['image3']['id']);?>" alt=""/>
<?php endif;?>
			</div>
		</div>
		<div class="gt-list-item">
			<h4>
				<span>empire</span> team players
			</h4>
			<ul class="gt-list">
				<li>
					<i class="fa-solid fa-check"></i>
					Donald trump
				</li>
				<li>
					<i class="fa-solid fa-check"></i>
					Andrew sajis
				</li>
				<li>
					<i class="fa-solid fa-check"></i>
					Timothy gone
				</li>
				<li>
					<i class="fa-solid fa-check"></i>
					Benjamin mal
				</li>
			</ul>
		</div>
	</div>
	</div>
	</div>
             
		<?php 
	}


}

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