<?php



use Elementor\Widget_Base;
use Elementor\Controls_Manager;

if (!defined('ABSPATH')) exit; // Exit if accessed directly


class Slidertenthkaveh extends Widget_Base{

  public function get_name(){
    return 'slidertenthkaveh';
  }

  public function get_title(){
    return esc_html__( 'Slider Style Ten', 'kavehTheme' );
  }

  public function get_icon(){
    return 'eicon-archive-posts';
  } 

  public function get_categories(){
    return ['kavehelements'];
  }

  protected function register_controls(){
    $this->start_controls_section(
      'content0slidertenthkaveh',
      [
        'label' => esc_html__( 'Left Bar', 'kavehTheme' ),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
      ]
    );   
    $this->add_control(
      'titles2slidertenthkaveh',
      [
          'label' => esc_html__( 'Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( 'Sale of Various', 'kavehTheme' ),
  
      ]
  );
  $this->add_control(
    'tagheading1s2slidertenthkaveh',
    [
      'label' => esc_html__( 'Title Tag', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::SELECT,
      'default' => 'H6',
      'options' => [
        'H1'  => esc_html__( 'H1', 'kavehTheme' ),
        'H2' => esc_html__( 'H2', 'kavehTheme' ),
        'H3' => esc_html__( 'H3', 'kavehTheme' ),
        'H4' => esc_html__( 'H4', 'kavehTheme' ),
        'H5' => esc_html__( 'H5', 'kavehTheme' ),
        'H6' => esc_html__( 'H6', 'kavehTheme' ),
        'p' => esc_html__( 'p', 'kavehTheme' ),
        'div' => esc_html__( 'div', 'kavehTheme' ),
        'span' => esc_html__( 'span', 'kavehTheme' ),
      ],
    ]
  );
  $this->add_control(
    'title2s2slidertenthkaveh',
    [
        'label' => esc_html__( 'Description', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => esc_html__( 'Metal Handicrafts', 'kavehTheme' ),

    ]
);
    $this->add_control(
      'buttons2slidertenthkaveh',
      [
          'label' => esc_html__( 'Button Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( 'Products', 'kavehTheme' ),
  
      ]
  );
  $this->add_control(
    'iconbutts2slidertenthkaveh',
    [
      'label' => esc_html__( 'Icon', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::ICONS,
      'skin' => 'inline',
      'exclude_inline_options' => [ 'svg' ],
      'default' => [
        'value' => 'icon-arrow-left-2',
      ],
    ]
  );
  $this->add_control(
    'linkbuttons2slidertenthkaveh',
    [
        'label' => esc_html__( 'Button Link', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => esc_html__( '#', 'kavehTheme' ),

    ]
);
$this->add_control(
  'backs2slidertenthkaveh',
  [
    'label' => esc_html__( 'Logo Image', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::MEDIA,
  ]
);
$this->add_control(
  'linkimgs2slidertenthkaveh',
  [
      'label' => esc_html__( 'Image Link', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::TEXT,
      'default' => esc_html__( '#', 'kavehTheme' ),

  ]
);
$this->add_control(
'showarrowslidertenthkaveh',
[
  'label' => esc_html__( 'Show Arrows?', 'kavehTheme' ),
  'type' => \Elementor\Controls_Manager::SWITCHER,
  'yes' => esc_html__( 'Yes', 'kavehTheme' ),
  'no' => esc_html__( 'No', 'kavehTheme' ),
  'return_value' => 'yes',
  'default' => 'yes',
]
);
$this->add_control(
  'backnvchjslidertenthkaveh',
  [
    'label' => esc_html__( 'Background Image', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::MEDIA,     
    'selectors' => [
      '{{WRAPPER}} .carpet-left' => 'background: url({{URL}}) center center no-repeat',
  ],       
  ]
);
    $this->end_controls_section();

    $this->start_controls_section(
        'contentslidertenthkaveh',
        [
          'label' => esc_html__( 'Slider', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      ); 
      $repeater = new \Elementor\Repeater();
      $repeater->add_control(
        'titleslidertenthkaveh',
        [
            'label' => esc_html__( 'Subtitle', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'default' => esc_html__( 'Sale of Various', 'kavehTheme' ),
    
        ]
    );
    $repeater->add_control(
      'tagheading1slidertenthkaveh',
      [
        'label' => esc_html__( 'Subtitle Tag', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'H6',
        'options' => [
          'H1'  => esc_html__( 'H1', 'kavehTheme' ),
          'H2' => esc_html__( 'H2', 'kavehTheme' ),
          'H3' => esc_html__( 'H3', 'kavehTheme' ),
          'H4' => esc_html__( 'H4', 'kavehTheme' ),
          'H5' => esc_html__( 'H5', 'kavehTheme' ),
          'H6' => esc_html__( 'H6', 'kavehTheme' ),
          'p' => esc_html__( 'p', 'kavehTheme' ),
          'div' => esc_html__( 'div', 'kavehTheme' ),
          'span' => esc_html__( 'span', 'kavehTheme' ),
        ],
      ]
    );
    $repeater->add_control(
      'title2slidertenthkaveh',
      [
          'label' => esc_html__( 'Main Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( 'Metal Handicrafts', 'kavehTheme' ),
  
      ]
  );
  $repeater->add_control(
    'tagheading2slidertenthkaveh',
    [
      'label' => esc_html__( 'Main Title Tag', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::SELECT,
      'default' => 'H3',
      'options' => [
        'H1'  => esc_html__( 'H1', 'kavehTheme' ),
        'H2' => esc_html__( 'H2', 'kavehTheme' ),
        'H3' => esc_html__( 'H3', 'kavehTheme' ),
        'H4' => esc_html__( 'H4', 'kavehTheme' ),
        'H5' => esc_html__( 'H5', 'kavehTheme' ),
        'H6' => esc_html__( 'H6', 'kavehTheme' ),
        'p' => esc_html__( 'p', 'kavehTheme' ),
        'div' => esc_html__( 'div', 'kavehTheme' ),
        'span' => esc_html__( 'span', 'kavehTheme' ),
      ],
    ]
  );
      $repeater->add_control(
        'buttonslidertenthkaveh',
        [
            'label' => esc_html__( 'Button Title', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'default' => esc_html__( 'Products', 'kavehTheme' ),
    
        ]
    );
    $repeater->add_control(
      'iconbuttslidertenthkaveh',
      [
        'label' => esc_html__( 'Icon', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::ICONS,
        'skin' => 'inline',
        'exclude_inline_options' => [ 'svg' ],
        'default' => [
          'value' => 'isax isax-arrow-left4',
        ],
      ]
    );
    $repeater->add_control(
      'linkbuttonslidertenthkaveh',
      [
          'label' => esc_html__( 'Button Link', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( '#', 'kavehTheme' ),
  
      ]
  );
  $repeater->add_control(
    'backslidertenthkaveh',
    [
      'label' => esc_html__( 'Select Your Image', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::MEDIA,
    ]
  );
      
      $this->add_control(
        'slidesslidertenthkaveh',
        [
          'label' => esc_html__( 'Slides', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::REPEATER,
          'default' => [
            [
              'titleslidertenthkaveh' => esc_html__( 'Sale of Various', 'kavehTheme' ),
              'title2slidertenthkaveh' => esc_html__( 'Metal Handicrafts', 'kavehTheme' ),
              'buttonslidertenthkaveh' => esc_html__( 'Products', 'kavehTheme' ),
              'linkbuttonslidertenthkaveh' => esc_html__( '#', 'kavehTheme' ),
            ],
          ],
          'fields' => $repeater->get_controls()
          ],
      );
      $this->add_control(
        'backjslidertenthkaveh',
        [
          'label' => esc_html__( 'Background Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,     
          'selectors' => [
            '{{WRAPPER}} .carpet-wrapper' => 'background: url({{URL}}) center center no-repeat',
        ],       
        ]
      );
      $this->add_control(
        'backj2slidertenthkaveh',
        [
          'label' => esc_html__( 'Shape Background Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,    
          'selectors' => [
            '{{WRAPPER}} .carpet-item .image .shape-1' => 'background: url({{URL}})',
        ],        
        ]
      );
       $this->end_controls_section();

             $this->start_controls_section(
              'style1_slidertenthkaveh',
              [
                'label' => esc_html__( 'Left Bar Style', 'kavehTheme' ),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
              ]
             );
             $this->add_control(
              'titlestslidertenthkaveh',
              [
                'label' => esc_html__( 'Title Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .title' => 'color: {{VALUE}} !important;',
                ],
              ]
             );
             $this->add_group_control(
              \Elementor\Group_Control_Typography::get_type(),
              [
                'name' => 'title_slidertenthkaveh',
                'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left .title',
              ]
             );
             $this->add_control(
              'titlepstslidertenthkaveh',
              [
                'label' => esc_html__( 'Description Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left p' => 'color: {{VALUE}} !important',
                ],
              ]
             );
             $this->add_group_control(
              \Elementor\Group_Control_Typography::get_type(),
              [
                'name' => 'p_slidertenthkaveh',
                'label' => esc_html__( 'Description Typography', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left p',
              ]
             );
             $this->add_group_control(
              \Elementor\Group_Control_Typography::get_type(),
              [
                'name' => 'button_nchslidertenthkaveh',
                'label' => esc_html__( 'Button Text Typography', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left .btn',
              ]
            );
            $this->add_control(
              'iconsizenchslidertenthkaveh',
              [
                'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => [ 'px' ],
                'range' => [
                  'px' => [
                    'min' => 0,
                    'max' => 200,
                    'step' => 1,
                  ],
                ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn i' => 'font-size: {{SIZE}}{{UNIT}};',
                ],
              ]
            );
            $this->add_control(
              'dotcolorpstslidertenthkaveh',
              [
                'label' => esc_html__( 'Dot Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn::before' => 'background-color: {{VALUE}} !important',
                ],
              ]
             );
            $this->add_group_control(
              \Elementor\Group_Control_Text_Shadow::get_type(),
              [
                'name' => 'text_shadownchslidertenthkaveh',
                'label' => esc_html__( 'Text Shadow', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left .btn',
              ]
            );
            $this->start_controls_tabs(
              'style_tabsnchslidertenthkaveh'
            );
            
            $this->start_controls_tab(
              'style_normal_tabnchslidertenthkaveh',
              [
                'label' => esc_html__( 'Normal', 'kavehTheme' ),
              ]
            );
            $this->add_control(
              'textbuttoncolornchslidertenthkaveh',
              [
                'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn' => 'color: {{VALUE}}',
                ],
              ]
            ); 
            $this->add_control(
              'iconcolornchslidertenthkaveh',
              [
                'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn i' => 'color: {{VALUE}}',
                ],
              ]
            ); 
            $this->add_control(
              'buttoncolornchslidertenthkaveh',
              [
                'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn' => 'background-color: {{VALUE}}',
                ],
              ]
            ); 
            $this->add_control(
              'buttonradiusnchslidertenthkaveh',
              [
                'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
              ]
            );
            $this->add_group_control(
              \Elementor\Group_Control_Border::get_type(),
              [
                'name' => 'bordernchslidertenthkaveh',
                'label' => esc_html__( 'Border', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left .btn',
              ]
            );
            $this->add_control(
              'buttonbordersnchslidertenthkaveh',
              [
                'label' => esc_html__( 'Border Width', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'condition' => [
                  'bordernchslidertenthkaveh!' => '',
                ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
                ],
              ]
            );
            $this->end_controls_tab();
            $this->start_controls_tab(
              'style_hove_tabnchslidertenthkaveh',
              [
                'label' => esc_html__( 'Hover', 'kavehTheme' ),
              ]
            );
            $this->add_control(
              'textbuttoncolorhovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn:hover' => 'color: {{VALUE}}',
                ],
              ]
            ); 
            $this->add_control(
              'iconcolorhovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn:hover i' => 'color: {{VALUE}}',
                ],
              ]
            ); 
            $this->add_control(
              'buttoncolorhovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn:hover' => 'background-color: {{VALUE}}',
                ],
              ]
            ); 
            $this->add_control(
              'buttonradiushovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
              ]
            );
            $this->add_group_control(
              \Elementor\Group_Control_Border::get_type(),
              [
                'name' => 'borderhovernchslidertenthkaveh',
                'label' => esc_html__( 'Border', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left .btn:hover',
              ]
            );
            $this->add_control(
              'buttonbordershovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Border Width', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'condition' => [
                  'borderhovernchslidertenthkaveh!' => '',
                ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
                ],
              ]
            );
            $this->end_controls_tab();
            $this->end_controls_tabs();
            $this->add_control(
              'hr1nchslidertenthkaveh',
              [
                'type' => \Elementor\Controls_Manager::DIVIDER,
              ]
            );
            $this->add_group_control(
              \Elementor\Group_Control_Box_Shadow::get_type(),
              [
                'name' => 'box_shadownchslidertenthkavehh',
                'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .carpet-left .btn',
              ]
            );
            $this->add_control(
              'buttonpaddingnchslidertenthkaveh',
              [
                'label' => esc_html__( 'Padding', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left .btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
              ]
            );
            $this->add_control(
              'widthbchmainslidertenthkaveh',
              [
                'label' => esc_html__( 'Logo Width', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => [ 'px' ],
                'range' => [
                  'px' => [
                    'min' => 0,
                    'max' => 300,
                    'step' => 1,
                  ],
                ],
                'selectors' => [
                  '{{WRAPPER}} .sltenl img' => 'width: {{SIZE}}{{UNIT}};',
                ],
              ]
            );
            $this->add_control(
              'heightbchmainslidertenthkaveh',
              [
                'label' => esc_html__( 'Logo Height', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => [ 'px' ],
                'range' => [
                  'px' => [
                    'min' => 0,
                    'max' => 300,
                    'step' => 1,
                  ],
                ],
                'selectors' => [
                  '{{WRAPPER}} .sltenl img' => 'height: {{SIZE}}{{UNIT}};',
                ],
              ]
            );
            $this->add_control(
              'arrowcolorhovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Arrows Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .swiper-button-fill .swiper-button-next::after' => 'color: {{VALUE}}',
                  '{{WRAPPER}} .swiper-button-fill .swiper-button-prev::after' => 'color: {{VALUE}}',

                ],
              ]
            ); 
            $this->add_control(
              'boxnvchradsliderradiushoverslidertenthkaveh',
              [
                'label' => esc_html__( 'Bar Border Radius', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
              ]
            );
            $this->add_control(
              'paddnvchradsliderradiushoverslidertenthkaveh',
              [
                'label' => esc_html__( 'Bar Padding', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-left' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
              ]
            );
            $this->add_control(
              'nvbgcolorhovernchslidertenthkaveh',
              [
                'label' => esc_html__( 'Bar Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .carpet-left' => 'background-color: {{VALUE}}',

                ],
              ]
            ); 
             $this->end_controls_section();
             
             
             
             
             
             $this->start_controls_section(
               'style2_slidertenthkaveh',
               [
                 'label' => esc_html__( 'Slides Style', 'kavehTheme' ),
                 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 
               ]
              );
              $this->add_control(
                'titlestnvrslidertenthkaveh',
                [
                  'label' => esc_html__( 'Subtitle Color', 'kavehTheme' ),
                  'type' => \Elementor\Controls_Manager::COLOR,
                  'selectors' => [
                    '{{WRAPPER}} .carpet-item .detail .sup-title' => 'color: {{VALUE}} !important;',
                  ],
                ]
               );
               $this->add_group_control(
                \Elementor\Group_Control_Typography::get_type(),
                [
                  'name' => 'title_nvrslidertenthkaveh',
                  'label' => esc_html__( 'Subtitle Typography', 'kavehTheme' ),
                  'selector' => '{{WRAPPER}} .carpet-item .detail .sup-title .ftsli',
                ]
               );
               $this->add_control(
                'titlepstnvrslidertenthkaveh',
                [
                  'label' => esc_html__( 'Title Color', 'kavehTheme' ),
                  'type' => \Elementor\Controls_Manager::COLOR,
                  'selectors' => [
                    '{{WRAPPER}} .carpet-item .detail .title' => 'color: {{VALUE}} !important',
                  ],
                ]
               );
               $this->add_group_control(
                \Elementor\Group_Control_Typography::get_type(),
                [
                  'name' => 'p_nvrslidertenthkaveh',
                  'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
                  'selector' => '{{WRAPPER}} .carpet-item .detail .title .atsli',
                ]
               );
              $this->add_group_control(
               \Elementor\Group_Control_Typography::get_type(),
               [
                 'name' => 'button_slidertenthkaveh',
                 'label' => esc_html__( 'Button Text Typography', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .carpet-item .detail .btn',
               ]
             );
             $this->add_control(
               'iconsizeslidertenthkaveh',
               [
                 'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 200,
                     'step' => 1,
                   ],
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn i' => 'font-size: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Text_Shadow::get_type(),
               [
                 'name' => 'text_shadowslidertenthkaveh',
                 'label' => esc_html__( 'Text Shadow', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .carpet-item .detail .btn',
               ]
             );
             $this->start_controls_tabs(
               'style_tabsslidertenthkaveh'
             );
             
             $this->start_controls_tab(
               'style_normal_tabslidertenthkaveh',
               [
                 'label' => esc_html__( 'Normal', 'kavehTheme' ),
               ]
             );
             $this->add_control(
               'textbuttoncolorslidertenthkaveh',
               [
                 'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'iconcolorslidertenthkaveh',
               [
                 'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn i' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttoncolorslidertenthkaveh',
               [
                 'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn' => 'background-color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttonradiusslidertenthkaveh',
               [
                 'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Border::get_type(),
               [
                 'name' => 'borderslidertenthkaveh',
                 'label' => esc_html__( 'Border', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .carpet-item .detail .btn',
               ]
             );
             $this->add_control(
               'buttonbordersslidertenthkaveh',
               [
                 'label' => esc_html__( 'Border Width', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'condition' => [
                   'borderslidertenthkaveh!' => '',
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
                 ],
               ]
             );
             $this->end_controls_tab();
             $this->start_controls_tab(
               'style_hove_tabslidertenthkaveh',
               [
                 'label' => esc_html__( 'Hover', 'kavehTheme' ),
               ]
             );
             $this->add_control(
               'textbuttoncolorhoverslidertenthkaveh',
               [
                 'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn:hover' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'iconcolorhoverslidertenthkaveh',
               [
                 'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn:hover i' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttoncolorhoverslidertenthkaveh',
               [
                 'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn:hover' => 'background-color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttonradiushoverslidertenthkaveh',
               [
                 'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Border::get_type(),
               [
                 'name' => 'borderhoverslidertenthkaveh',
                 'label' => esc_html__( 'Border', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .carpet-item .detail .btn:hover',
               ]
             );
             $this->add_control(
               'buttonbordershoverslidertenthkaveh',
               [
                 'label' => esc_html__( 'Border Width', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'condition' => [
                   'borderhoverslidertenthkaveh!' => '',
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
                 ],
               ]
             );
             $this->end_controls_tab();
             $this->end_controls_tabs();
             $this->add_control(
               'hr1slidertenthkaveh',
               [
                 'type' => \Elementor\Controls_Manager::DIVIDER,
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Box_Shadow::get_type(),
               [
                 'name' => 'box_shadowslidertenthkavehh',
                 'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .carpet-item .detail .btn',
               ]
             );
             $this->add_control(
               'buttonpaddingslidertenthkaveh',
               [
                 'label' => esc_html__( 'Padding', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .detail .btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                 ],
               ]
             );
              $this->end_controls_section();
             
             
             
              $this->start_controls_section(
               'style3_slidertenthkaveh',
               [
                 'label' => esc_html__( 'Images Style', 'kavehTheme' ),
                 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 
               ]
              );
             $this->add_control(
               'widthmainslidertenthkaveh',
               [
                 'label' => esc_html__( 'Slider Image Width', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 5,
                   ],
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .image img' => 'width: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_control(
              'heightmainslidertenthkaveh',
              [
                'label' => esc_html__( 'Slider Image Height', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => [ 'px' ],
                'range' => [
                  'px' => [
                    'min' => 0,
                    'max' => 2000,
                    'step' => 5,
                  ],
                ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-item .image img' => 'height: {{SIZE}}{{UNIT}};',
                ],
              ]
            );
             $this->add_control(
               'width2bgslidertenthkaveh',
               [
                 'label' => esc_html__( 'Background Shape Image Size', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 5,
                   ],
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-item .image .shape-1' => 'width: {{SIZE}}{{UNIT}};',
                   '{{WRAPPER}} .carpet-item .image .shape-1' => 'height: {{SIZE}}{{UNIT}};',

                 ],
               ]
             );
              $this->end_controls_section();
              $this->start_controls_section(
               'style4_slidertenthkaveh',
               [
                 'label' => esc_html__( 'General Style', 'kavehTheme' ),
                 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
               ]
              );
              $this->add_control(
                'bgcolorslidertenthkaveh',
                [
                  'label' => esc_html__( 'Background Color', 'kavehTheme' ),
                  'type' => \Elementor\Controls_Manager::COLOR,
                  'selectors' => [
                    '{{WRAPPER}} .carpet-wrapper' => 'background-color: {{VALUE}} !important;',
        
                  ],
                ]
              );
             $this->add_control(
               'heightwrapperslidertenthkaveh',
               [
                 'label' => esc_html__( 'Slider Height', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 1,
                   ],
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .carpet-wrapper' => 'max-height: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_control(
              'boxsliderradiushoverslidertenthkaveh',
              [
                'label' => esc_html__( 'Slider Border Radius', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::DIMENSIONS,
                'size_units' => [ 'px' ],
                'selectors' => [
                  '{{WRAPPER}} .carpet-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
              ]
            );
              $this->end_controls_section();
        }


  protected function render(){
    $settings = $this->get_settings_for_display();
    $clsid = $this->get_id();
    ?>
    <section class="carpet">
      <div class="container position-relative">
        <div class="carpet-wrapper d-flex w-100 mx-auto flex-column-reverse flex-md-row overflow-hidden">
          <!-- Strat Carousel -->
          <div class="carpet-carousel position-relative w-100">
            <div class="swiper swiper-carpet swiper-button-fill" data-swiper='{"navigation":{"nextEl":".swiper-button-next","prevEl":".swiper-button-prev"},"slidesPerView":1,"spaceBetween":0,"effect":"fade","fadeEffect":{"crossFade":true},"loop":true,"autoplay":{"delay":5000,"disableOnInteraction":false,"pauseOnMouseEnter":true}}'>
              <div class="swiper-wrapper">
                <?php
                if ( $settings['slidesslidertenthkaveh'] ) {
                foreach (  $settings['slidesslidertenthkaveh'] as $item ) {
                ?>
                <!-- Start Slide -->
                <div class="swiper-slide">
                  <div class="carpet-item d-flex align-items-sm-center flex-column flex-sm-row">
                    <div class="image position-relative">
                      <img src="<?php echo esc_url($item['backslidertenthkaveh']['url']); ?>" alt="<?php echo esc_attr(\Elementor\Control_Media::get_image_alt( $item['backslidertenthkaveh'] )); ?>" width="188" height="253">
                      <span class="shape-1 position-absolute"></span>
                    </div>
                    <div class="detail text-center text-sm-start">
                      <div class="sup-title text-white overflow-hidden">
                        <<?php echo esc_html($item['tagheading1slidertenthkaveh']); ?> class="d-block ftsli"><?php echo esc_html($item['titleslidertenthkaveh']); ?></<?php echo esc_html($item['tagheading1slidertenthkaveh']); ?>>
                      </div>
                      <div class="title text-white overflow-hidden">
                        <<?php echo esc_html($item['tagheading2slidertenthkaveh']); ?> class="atsli"><?php echo esc_html($item['title2slidertenthkaveh']); ?></<?php echo esc_html($item['tagheading2slidertenthkaveh']); ?>>
                      </div>
                      <a href="<?php echo esc_url($item['linkbuttonslidertenthkaveh']); ?>" class="btn btn-dark-2">
                       <?php echo esc_html($item['buttonslidertenthkaveh']); ?>
                        <i class="<?php echo esc_html($item['iconbuttslidertenthkaveh']['value']); ?>"></i>
                      </a>
                    </div>
                  </div>
                </div>
                <!-- End Slide -->
                <?php
                  }
                }
                ?>
              </div>
              <?php if("yes"===$settings['showarrowslidertenthkaveh']){?>
              <div class="swiper-button-next"></div>
              <div class="swiper-button-prev"></div>
              <?php } ?>
            </div>
          </div>
          <!-- End Carousel -->
          <!-- Start Left -->
          <div class="carpet-left w-100 d-flex flex-column align-items-center justify-content-center position-relative">
            <div>
              <<?php echo  esc_html($settings['tagheading1s2slidertenthkaveh']); ?> class="title text-white text-center"> <?php echo  esc_html($settings['titles2slidertenthkaveh']); ?> </<?php echo  esc_html($settings['tagheading1s2slidertenthkaveh']); ?>>
              <p class="text-white text-center"><?php echo  esc_html($settings['title2s2slidertenthkaveh']); ?></p>
              <a href="<?php echo  esc_url($settings['linkbuttons2slidertenthkaveh']); ?>"
                class="btn btn-outline-light d-flex align-items-center justify-content-center w-100 position-relative">
                <?php echo  esc_html($settings['buttons2slidertenthkaveh']); ?>
                <i class="<?php echo  esc_html($settings['iconbutts2slidertenthkaveh']['value']); ?>"></i>
              </a>
              <a href="<?php echo  esc_url($settings['linkimgs2slidertenthkaveh']); ?>" class="logo d-flex align-items-center justify-content-center sltenl">
                <img src="<?php echo esc_url($settings['backs2slidertenthkaveh']['url']); ?>" alt="<?php echo esc_attr(\Elementor\Control_Media::get_image_alt( $settings['backs2slidertenthkaveh'] )); ?>" width="78" height="26">
              </a>
            </div>
          </div>
          <!-- End Left -->
        </div>
      </div>
    </section>
    <style>
      .carpet-item .image img {
       object-fit: contain !important;
      }
    </style>
      
    <?php  
  }


}
