<?php

use Elementor\Widget_Base;
use Elementor\Controls_Manager;

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


class Brandsseventhstkaveh extends Widget_Base{

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

  public function get_title(){
    return esc_html__( 'Brands Carousel Style Seven', 'kavehTheme' );
  }

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

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

  protected function register_controls(){
    
    $this->start_controls_section(
        'contentbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Element Content', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      );
        $this->add_control(
          'titlebrandsseventhstkaveh',
          [
              'label' => esc_html__( 'Main Title', 'kavehTheme' ),
              'type' => \Elementor\Controls_Manager::TEXT,
              'default' => esc_html__( 'Kaveh Store', 'kavehTheme' ),   
          ]
      );
    $this->add_control(
      'tagheading1brandsseventhstkaveh',
      [
        'label' => esc_html__( 'Main Title Tag', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'H2',
        '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 = new \Elementor\Repeater();

      $repeater->add_control(
        'brandlogobrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Brand Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,
          'default' => [
            'url' => \Elementor\Utils::get_placeholder_image_src(),
          ],
        ]
        );
        $repeater->add_control(
          'linkbrandsseventhstkaveh',
          [
              'label' => esc_html__( 'Brand Link', 'kavehTheme' ),
              'type' => \Elementor\Controls_Manager::TEXT,
              'default' => esc_html__( '#', 'kavehTheme' ),
      
          ]
      );
    $this->add_control(
      'listbrandsseventhstkaveh',
      [
        'label' => esc_html__( 'Categories', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $repeater->get_controls(),
        'default' => [
          [
            'linkbrandsseventhstkaveh' => esc_html__( '#', 'kavehTheme' ),
          ],
      ]
      ]
    
    );
    $this->add_control(
      'buttonti2brandsseventhstkavehh',
      [
          'label' => esc_html__( 'Button Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( 'View All', 'kavehTheme' ),
  
      ]
  );
  $this->add_control(
    'buttontilink2brandsseventhstkavehh',
    [
        'label' => esc_html__( 'Button Link', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => esc_html__( '#', 'kavehTheme' ),

    ]
);
       $this->end_controls_section();
       $this->start_controls_section(
        'content2brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Carousel Settings', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      );
      $this->add_control(
        'productcolumnbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Number of Product Columns on Desktop', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 10,
          'step' => 0.5,
          'default' => 8,
      
        ]
      ); 
      $this->add_control(
        'productcolumn2brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Number of Product Columns on Tablet', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 5,
          'step' => 0.5,
          'default' => 3,
      
        ]
      );
      $this->add_control(
        'productcolumn3brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Number of Product Columns on Mobile', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 5,
          'step' => 0.5,
          'default' => 2,
      
        ]
      );
      $this->add_control(
        'autoplaybrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Enable Autoplay', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'no',
        ]
      );
      $this->add_control(
        'autoplaydelaybrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Autoplay Delay (ms)', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 1000,
          'max' => 10000,
          'step' => 500,
          'default' => 3000,
          'condition' => [
            'autoplaybrandsseventhstkaveh' => 'yes',
          ],
        ]
      );
      $this->add_control(
        'pauseonhoverbrandsseventhstkaveh',
        [
          
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
          'condition' => [
            'autoplaybrandsseventhstkaveh' => 'yes',
          ],
        ]
      );
      $this->add_control(
        'loopbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Infinite Loop', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
        ]
      );
      $this->add_control(
        'speedbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Transition Speed (milliseconds)', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 300,
          'max' => 3000,
          'step' => 100,
          'default' => 300,
        ]
      );
      $this->add_control(
        'centeredslidesbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Centered Slides', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'no',
        ]
      );
      $this->add_control(
        'freemodebrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Free Mode', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'no',
          'description' => esc_html__( 'Slides move freely', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'effectbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Transition Effect', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SELECT,
          'default' => 'slide',
          'options' => [
            'slide' => esc_html__( 'Slide', 'kavehTheme' ),
          'fade' => esc_html__( 'Fade', 'kavehTheme' ),
          'cube' => esc_html__( 'Cube', 'kavehTheme' ),
          'coverflow' => esc_html__( 'Coverflow', 'kavehTheme' ),
          'flip' => esc_html__( 'Flip', 'kavehTheme' ),
          ],
        ]
      );
      $this->add_control(
        'showarrowbrandsseventhstkaveh',
        [
          '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' => 'no',
        ]
      );
      $this->add_control(
        'showdotsbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Show Pagination Dots', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'no',
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'style0_brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Title Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'textcolor1brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Title Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .top-brands-bani-title' => 'color: {{VALUE}} !important',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'titlety1_brandsseventhstkaveh',
          'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .top-brands-bani-title',
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'stylec_brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Brands Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'catimg1widthbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Image Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 500,
              'step' => 1,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .top-brands-bani .swiper img' => 'width: {{SIZE}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->add_control(
        'catimg1height2brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Image Height', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 500,
              'step' => 1,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .top-brands-bani .swiper img' => 'height: {{SIZE}}{{UNIT}}!important;',
          ],
        ]
      );
      $this->add_control(
        'imgradiusbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Image Border Radius', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .top-brands-bani .swiper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );



      $this->end_controls_section();
      $this->start_controls_section(
        'styleb_brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'button_brandsseventhstkaveh',
          'label' => esc_html__( 'Button Text Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .btn-more-bani',
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Text_Shadow::get_type(),
        [
          'name' => 'text_shadowbrandsseventhstkaveh',
          'label' => esc_html__( 'Text Shadow', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .btn-more-bani',
        ]
      );
      $this->start_controls_tabs(
        'style_tabsbrandsseventhstkaveh'
      );
    
      $this->start_controls_tab(
        'style_normal_tabbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Brands', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'textbuttoncolorbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani' => 'color: {{VALUE}}',
          ],
        ]
      ); 
      $this->add_control(
        'buttoncolorbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani' => 'background-color: {{VALUE}}',
          ],
        ]
      ); 
      $this->add_control(
        'buttonradiusbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Border::get_type(),
        [
          'name' => 'borderbrandsseventhstkaveh',
          'label' => esc_html__( 'Border', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .btn-more-bani',
        ]
      );
      $this->add_control(
        'buttonbordersbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Border Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'condition' => [
            'borderbrandsseventhstkaveh!' => '',
          ],
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->end_controls_tab();
      $this->start_controls_tab(
        'style_hove_tabbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Hover', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'textbuttoncolorhoverbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani:hover' => 'color: {{VALUE}}',
          ],
        ]
      ); 
      $this->add_control(
        'buttoncolorhoverbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani:hover' => 'background-color: {{VALUE}}',
          ],
        ]
      ); 
      $this->add_control(
        'buttonradiushoverbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Border::get_type(),
        [
          'name' => 'borderhoverbrandsseventhstkaveh',
          'label' => esc_html__( 'Border', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .btn-more-bani:hover',
        ]
      );
      $this->add_control(
        'buttonbordershoverbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Border Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'condition' => [
            'borderhoverbrandsseventhstkaveh!' => '',
          ],
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->end_controls_tab();
      $this->end_controls_tabs();
      $this->add_group_control(
        \Elementor\Group_Control_Box_Shadow::get_type(),
        [
          'name' => 'box_shadowbrandsseventhstkaveh',
          'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .btn-more-bani',
        ]
      );
      $this->add_control(
        'hr2brandsseventhstkaveh',
        [
          'type' => \Elementor\Controls_Manager::DIVIDER,
        ]
      );
      $this->add_control(
        'buttonpaddingbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Padding', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .btn-more-bani' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'style5_brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Carousel Arrows Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'iconsizenchbbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 200,
              'step' => 1,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .swiper-bani .swiper-button-next::after' => 'font-size: {{SIZE}}{{UNIT}};',
            '{{WRAPPER}} .swiper-bani .swiper-button-prev::after' => 'font-size: {{SIZE}}{{UNIT}};',

          ],
        ]
      );
      $this->start_controls_tabs(
        'style_tabsarrowbrandsseventhstkaveh'
      );
    
      $this->start_controls_tab(
        'style_normal_tabarrowbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Brands', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'textbutton1colorarrowbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .swiper-bani .swiper-button-next::after' => 'color: {{VALUE}}',
            '{{WRAPPER}} .swiper-bani .swiper-button-prev::after' => 'color: {{VALUE}}',

          ],
        ]
      ); 
      $this->end_controls_tab();
      $this->start_controls_tab(
        'style_hove_tabarrowbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Hover', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'textbutton1hovercolorarrowbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .swiper-bani .swiper-button-next:hover::after' => 'color: {{VALUE}}',
            '{{WRAPPER}} .swiper-bani .swiper-button-prev:hover::after' => 'color: {{VALUE}}',
           ],
        ]
      ); 
      $this->end_controls_tab();
      $this->end_controls_tabs();
      $this->end_controls_section();
       $this->start_controls_section(
        'style_brandsseventhstkaveh',
        [
          'label' => esc_html__( 'Box Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );

      $this->add_control(
        'colorbrandsbgbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .top-brands-bani' => 'background-color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'boxpaddingbrandsseventhstkaveh',
        [
          'label' => esc_html__( 'Padding', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .top-brands-bani' => 'padding: {{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="top-brands-bani">
      <div class="container">
        <<?php echo  esc_attr($settings['tagheading1brandsseventhstkaveh']); ?> class="top-brands-bani-title text-center"> <?php echo  esc_attr($settings['titlebrandsseventhstkaveh']); ?></<?php echo  esc_attr($settings['tagheading1brandsseventhstkaveh']); ?>>
        <div class="position-relative">
          <!-- Start Carousel -->
          <div class="swiper swiper-top-brands-bani overflow-hidden swiper-bani" data-swiper='<?php echo json_encode([
            "loop" => $settings['loopbrandsseventhstkaveh'] === "yes",
            "autoplay" => $settings['autoplaybrandsseventhstkaveh'] === "yes" ? [
              "delay" => intval($settings['autoplaydelaybrandsseventhstkaveh']),
              "pauseOnMouseEnter" => $settings['pauseonhoverbrandsseventhstkaveh'] === "yes"
            ] : false,
            "speed" => intval($settings['speedbrandsseventhstkaveh']),
            "effect" => $settings['effectbrandsseventhstkaveh'],
            "centeredSlides" => $settings['centeredslidesbrandsseventhstkaveh'] === "yes",
            "freeMode" => $settings['freemodebrandsseventhstkaveh'] === "yes",
            "navigation" => $settings['showarrowbrandsseventhstkaveh'] === "yes" ? [
              "prevEl" => ".swiper-button-prev",
              "nextEl" => ".swiper-button-next"
            ] : false,
            "pagination" => $settings['showdotsbrandsseventhstkaveh'] === "yes" ? [
              "el" => ".swiper-pagination",
              "clickable" => true
            ] : false,
            "breakpoints" => [
              320 => ["slidesPerView" => intval($settings['productcolumn3brandsseventhstkaveh']), "spaceBetween" => 4],
              576 => ["slidesPerView" => intval($settings['productcolumn2brandsseventhstkaveh']), "spaceBetween" => 8],
              768 => ["slidesPerView" => intval($settings['productcolumn2brandsseventhstkaveh']), "spaceBetween" => 12],
              992 => ["slidesPerView" => intval($settings['productcolumnbrandsseventhstkaveh']), "spaceBetween" => 12],
            ]
          ], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>'>
            <div class="swiper-wrapper">
            <?php
                if ( $settings['listbrandsseventhstkaveh'] ) {
                foreach (  $settings['listbrandsseventhstkaveh'] as $item ) {
                ?>
              <!-- Start Slide -->
              <div class="swiper-slide">
                <a href="<?php echo  esc_html($item['linkbrandsseventhstkaveh']); ?>" class="d-block">
                  <img src="<?php echo esc_url($item['brandlogobrandsseventhstkaveh']['url']); ?>" alt="" width="141" height="72"
                    class="w-100 d-block">
                </a>
              </div>
              <!-- End Slide -->
              <?php 
                   }
                  }
                  ?>
            </div>
            <!-- Start Button -->
            <?php if($settings['showarrowbrandsseventhstkaveh'] === 'yes'){ ?>
              <div class="swiper-button-prev end-0 d-none d-sm-flex"></div>
              <div class="swiper-button-next end-0 d-none d-sm-flex"></div>
            <?php } ?>
            <!-- End Button -->
          </div>
          <!-- End Carousel -->
        </div>
        <a href="<?php echo  esc_html($settings['buttontilink2brandsseventhstkavehh']); ?>"
          class="btn btn-outline-dark-4 btn-more-bani d-flex align-items-center justify-content-center mx-auto w-100 mt-5 rounded-pill">
          <?php echo  esc_attr($settings['buttonti2brandsseventhstkavehh']); ?></a>
      </div>
    </section>
<style>
  .top-brands-bani .swiper img {
    object-fit: contain;
}
</style>

    <?php
  }


}
