<?php
namespace Elementor;

class metasingle extends Widget_Base {
	
	public function get_name() {
		return 'metasingle';
	}
	
	public function get_title() {
		return 'متا محصولات';
	}
	
 public function get_icon() {
		return 'eicon eicon-product-meta';
    }
    
    public function get_categories() {
        return [ 'farnamproduct' ];
    }

	
	protected function register_controls() {





		
		
  $this->start_controls_section(
            'farnam_product_style_2',
            [
                'label' => esc_html__( 'تنظیمات استایل و ظاهر', 'woolentor' ),
            ]
        );


		    $this->add_control(
'sepidcolor-2',
			[
				'label' => __( 'رنگ پس زمینه ایکون', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:first-child i' => 'background: {{VALUE}} !important',
				],
			]
           );
		      $this->add_control(
'sepidcolor-3',
			[
				'label' => __( 'رنگ ایکون دسته بندی', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:first-child i' => 'color: {{VALUE}} !important',
				],
			]
           );
		   
  $this->add_control(
'sepidcolor-5fr1',
			[
				'label' => __( 'رنگ متن دسته بندی', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:first-child' => 'color: {{VALUE}} !important',
				],
			]
           );

		
		  $this->add_control(
'sepidcolor-4',
			[
				'label' => __( 'رنگ دسته بندی ها', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:first-child a' => 'color: {{VALUE}} !important',
				],
			]
           );
		   
		   	      $this->add_control(
'sepidcolor-5',
			[
				'label' => __( 'رنگ پس زمینه ایکون برچسب', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:last-child i' => 'background: {{VALUE}} !important',
				],
			]
           );
		   
	      $this->add_control(
'sepidcolor-6554',
			[
				'label' => __( 'رنگ ایکون برچسب ها', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:last-child i' => 'color: {{VALUE}} !important',
				],
			]
           );
		$this->add_control(
'sepidcolor-655444',
			[
				'label' => __( 'رنگ عنوان برچسب ها', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:last-child' => 'color: {{VALUE}} !important',
				],
			]
           );
		   
		   	$this->add_control(
'sepidcolor-6554443d',
			[
				'label' => __( 'رنگ برچسب ها', 'plugin-domain' ),
				'type' => Controls_Manager::COLOR,
			
				'selectors' => [
					'{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:last-child a' => 'color: {{VALUE}} !important',
				],
			]
           );
		   
					 $this->add_responsive_control(
                        'sepidborder-2',
                        [
                            'label' => esc_html__( 'گردی ایکون دسته بندی', 'woolentor' ),
                            'type' => Controls_Manager::DIMENSIONS,
                            'selectors' => [
                                '{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product i' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px !important;',
                            ],
                        ]
                    );
					
					
					$this->add_responsive_control(
                        'sepidborder-244',
                        [
                            'label' => esc_html__( 'گردی ایکون برچسب ', 'woolentor' ),
                            'type' => Controls_Manager::DIMENSIONS,
                            'selectors' => [
                                '{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:last-child i' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px !important;',
                            ],
                        ]
                    );
					
					
					
					
		   		   $this->add_control(
                        'titr-mehr-4',
                        [
                            'label' => __( 'سایه ایکون دسته بندی', 'woolentor' ),
                            'type' => Controls_Manager::HEADING,
                                              ]
                    );

			$this->add_group_control(
			\Elementor\Group_Control_Box_Shadow::get_type(),
			[
				'name' => 'box_shadow',
				'selector' => '{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product i',
			]
		);
		
					
					
		   		   $this->add_control(
                        'titr-mehr-555',
                        [
                            'label' => __( 'سایه ایکون برچسب', 'woolentor' ),
                            'type' => Controls_Manager::HEADING,
                                              ]
                    );

			$this->add_group_control(
			\Elementor\Group_Control_Box_Shadow::get_type(),
			[
				'name' => 'box_shad55ow',
				'selector' => '{{WRAPPER}} .cat-or-tag-sepid-single-product .category-sepid-product:last-child i',
			]
		);
		
		
		$this->end_controls_section();
		
	}
	protected function render() {
		$settings = $this->get_settings_for_display();
defined( 'ABSPATH' ) || exit;
global $product;

  if (!is_product()){
        return;
    }
  $product = wc_get_product();
    $id = $product->get_id();

				?>
			
<div class="cat-or-tag-sepid-single-product">

<?php echo wc_get_product_category_list( $id = $product->get_id(), ', ', '<div class="category-sepid-product"><i class=" fi fi-rr-list"></i>' . _n( 'Category:', 'Categories:', count( $product->get_category_ids() ), 'woocommerce' ) . ' ', '</div>' ); ?>



<?php echo wc_get_product_tag_list( $id = $product->get_id(), ', ', '<div class="category-sepid-product tagine-1"><i class=" fi fi-rr-label"></i>' . _n( 'Tag:', 'Tags:', count( $product->get_tag_ids() ), 'woocommerce' ) . ' ', '</div>' ); ?>


</div>

		<?php


	}


	
	protected function _content_template() {

    }
	
	
}
