<?php



use Elementor\Widget_Base;
use Elementor\Controls_Manager;

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


class Aparatframekaveh extends Widget_Base{

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

  public function get_title(){
    return esc_html__( 'Aparat Element', 'kavehTheme' );
  }

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

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

  protected function register_controls(){
    
    $this->start_controls_section(
        'contentaparatframekaveh',
        [
          'label' => esc_html__( 'Element Content', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      );
        $this->add_control(
          'beforetitleaparatframekaveh',
          [
              'label' => esc_html__( 'Subtitle', 'kavehTheme' ),
              'type' => \Elementor\Controls_Manager::TEXT,
              'default' => esc_html__( 'Video', 'kavehTheme' ),
      
          ]
      );
      $this->add_control(
        'titleaparatframekaveh',
        [
            'label' => esc_html__( 'Main Title', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'default' => esc_html__( 'Company Introduction', 'kavehTheme' ),
    
        ]
    );
      $this->add_control(
        'codeaparatframekaveh',
        [
            'label' => esc_html__( 'Aparat Video Iframe Code', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::CODE,
            'language' => 'html',
            'rows' => 100, 
        ]
    ); 


        $this->end_controls_section();
        $this->start_controls_section(
          'style_aparatframekaveh',
          [
            'label' => esc_html__( 'Style', 'kavehTheme' ),
            'tab' => \Elementor\Controls_Manager::TAB_STYLE,
          ]
        );
        $this->add_control(
          'titlecolor1aparatframekaveh',
          [
            'label' => esc_html__( 'Subtitle Color', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::COLOR,
            'selectors' => [
              '{{WRAPPER}} .about-us-introduction-company-heading .sup-title' => 'color: {{VALUE}}',
            ],
          ]
        );
        $this->add_group_control(
          \Elementor\Group_Control_Typography::get_type(),
          [
            'name' => 'titletypeaparatframekaveh',
            'label' => esc_html__( 'Subtitle Typography', 'kavehTheme' ),
            'selector' => '{{WRAPPER}} .about-us-introduction-company-heading .sup-title',
          ]
        );
        $this->add_control(
          'titlecolor2aparatframekaveh',
          [
            'label' => esc_html__( 'Main Title Color', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::COLOR,
            'selectors' => [
              '{{WRAPPER}} .about-us-introduction-company-heading .title' => 'color: {{VALUE}}',
            ],
          ]
        );
        $this->add_group_control(
          \Elementor\Group_Control_Typography::get_type(),
          [
            'name' => 'titletype2aparatframekaveh',
            'label' => esc_html__( 'Main Title Typography', 'kavehTheme' ),
            'selector' => '{{WRAPPER}} .about-us-introduction-company-heading .title',
          ]
        );
        $this->end_controls_section();
          
        }


  protected function render(){
    $settings = $this->get_settings_for_display();
    $clsid = $this->get_id();
  
?>
    <div class="about-us-introduction-company">
      <div class="container">
        <!-- Start Heading -->
        <div class="about-us-introduction-company-heading position-relative">
          <div class="sup-title fw-light">
          <?php echo  esc_html($settings['beforetitleaparatframekaveh']); ?>
          </div>
          <div class="title">
          <?php echo  esc_html($settings['titleaparatframekaveh']); ?>
         </div>
        </div>
        <!-- End Heading -->
        <div class="video-box position-relative w-100 mx-auto">
        <?php echo  $settings['codeaparatframekaveh']; ?>
      </div>
    </div>
    <?php
  }


}
