<?php
/**
 * Extra Addons Post Overlay Slider
 */
use \Elementor\Controls_Stack;
use \Elementor\Repeater;
use \Elementor\Utils;
use \Elementor\Controls_Manager;
use \Elementor\Group_Control_Border;
use \Elementor\Group_Control_Box_Shadow;
use \Elementor\Group_Control_Typography;
use \Elementor\Widget_Base;
use \Elementor\Group_Control_Background;
use \Elementor\Group_Control_Text_Shadow;
use \Elementor\Group_Control_Css_Filter;
use \Elementor\Group_Control_Image_Size;

class Rswpthemes_Awt_Post_Sliders extends Widget_Base {

	/**
	 * Get widget name.
	 *
	 * Retrieve oEmbed widget name.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'rswpthemes_awt_post_sliders';
	}
	/**
	 * Get widget title.
	 *
	 * Retrieve oEmbed widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return __( 'Awt Posts Sliders', 'author-website-templates' );
	}

	/**
	 * Get widget icon.
	 *
	 * Retrieve oEmbed widget icon.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'dashicons dashicons-slides';
	}

	/**
	 * Get widget categories.
	 *
	 * Retrieve the list of categories the oEmbed widget belongs to.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'rswpthemes_awt_widgets' ];
	}

	public function get_script_depends() {
		return [ 'owl-carousel', 'rswpthemes-awt-posts-full-width-slider' ];
	}

	public function get_style_depends() {
		return [ 'owl-carousel', 'rswpthemes-awt-posts-full-width-slider' ];
	}

	/**
	 * Register oEmbed 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() {

		$this->start_controls_section(
			'rswpthemes_awt_post_slider_query_section',
			[
				'label' => __( 'Query', 'author-website-templates' ),
				'tab' => Controls_Manager::TAB_CONTENT,
			]
		);

		$this->start_controls_tabs(
			'rswpthemes_awt_post_slider_query_tabs'
		);
		$this->start_controls_tab(
			'rswpthemes_awt_post_slider_query_include',
			[
				'label' => __( 'Include', 'author-website-templates' ),
			]
		);
		$select_post_categories = array();
		$select_post_cats = get_terms( 'category' );
		foreach ($select_post_cats as $select_post_cat) :
			$select_post_categories[$select_post_cat->slug] = $select_post_cat->name;
		endforeach;

		$this->add_control(
			'select_categories',
			[
				'label' => __( 'Include Categories', 'author-website-templates' ),
				'type' => Controls_Manager::SELECT2,
				'multiple' => true,
				'options' => $select_post_categories,
				'separator' => 'before',
			]
		);

		$this->add_control(
			'post_slider_author_in',
			[
				'label' => __( 'Include Authors', 'author-website-templates' ),
				'description' => __( 'Insert Author ID seperated by Comma.', 'author-website-templates' ),
				'type' => Controls_Manager::TEXTAREA,
				'placeholder'=> '79,109',
				'rows' => '2',
				'separator' => 'before',
			]
		);

		$this->end_controls_tab();
		$this->start_controls_tab(
			'rswpthemes_awt_post_slider_query_exclude',
			[
				'label' => __( 'Exclude', 'author-website-templates' ),
			]
		);
		$this->add_control(
			'post_slider_exclude_categories',
			[
				'label' => __( 'Exclude Categories', 'author-website-templates' ),
				'description' => __( 'Insert Category ID and seperated by Comma.', 'author-website-templates' ),
				'type' => Controls_Manager::TEXTAREA,
				'placeholder'=> '107,116',
				'rows' => '2',
				'separator' => 'before',
			]
		);

		$this->add_control(
			'post_slider_author_not_in',
			[
				'label' => __( 'Exclude Author', 'author-website-templates' ),
				'description' => __( 'Insert Author ID and seperated by Comma.', 'author-website-templates' ),
				'type' => Controls_Manager::TEXTAREA,
				'placeholder'=> '57,86',
				'rows' => '2',
				'separator' => 'before',
			]
		);
		$this->add_control(
			'post_slider_offset',
			[
				'label' => __( 'Offset', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'default' => 0,
				'separator' => 'before',
				'min' => 0,
				'max' => 100,
				'step' => 1,
			]
		);
		$this->end_controls_tabs();
		$this->add_control(
			'slider_post_count',
			[
				'label' => __( 'Post Count', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'min' => 1,
				'max' => 15,
				'step' => 1,
				'default' => 3,
				'separator' => 'before',
			]
		);
		$this->add_control(
			'slider_ignore_sticky_post',
			[
				'label'        => __( 'Ignore Sticky Post?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'YES', 'author-website-templates' ),
				'label_off'    => __( 'NO', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'main_slider_element_on_off',
			[
				'label' => __( 'Slider Element On//Off', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			]
		);
		$this->add_control(
			'post_image_show',
			[
				'label'        => __( 'Show Thumbnail ?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_group_control(
			Group_Control_Image_Size::get_type(),
			[
				'name' => 'sliderimage', // Actually its `image_size`.
				'default' => 'large',
				'exclude' => [ 'custom' ],
			]
		);
		$this->add_control(
			'post_slider_title_show',
			[
				'label'        => __( 'Show Title?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'show_slider_post_excerpt',
			[
				'label'        => __( 'Show Excerpt?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',

			]
		);

		$this->add_control(
			'slider_excerpt_length',
			[
				'label' => __( 'Excerpt Length', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'min' => 70,
				'max' => 600,
				'step' => 10,
				'default' => 150,
				'condition' => [

					'show_slider_post_excerpt' => 'true',
				],
			]
		);
		$this->add_control(
			'show_slider_post_meta',
			[
				'label'        => __( 'Show Post Meta?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',

			]
		);
		$this->add_control(
			'slider_post_meta_data',
			[
				'label' => __( 'Post Meta', 'author-website-templates' ),
				'type' => Controls_Manager::SELECT2,
				'multiple' => true,
				'options' => [
					'author'	=>	__( 'Author', 'author-website-templates' ),
					'date'	=>	__( 'Date', 'author-website-templates' ),
					'comments'	=>	__( 'Comments', 'author-website-templates' ),
				],
				'default'	=> ['author', 'date', 'comments'],
				'condition'	=>	[
					'show_slider_post_meta'	=>	'true',
				]
			]
		);
		$this->add_control(
			'show_slider_category',
			[
				'label'        => __( 'Show Category?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',

			]
		);

		$this->add_control(
			'slider_post_read_button',
			[
				'label'        => __( 'Show Read More Button?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',

			]
		);

		$this->add_control(
			'button_text',
			[
				'label'        => __( 'Button Text', 'author-website-templates' ),
				'type'         => Controls_Manager::TEXT,
				'default'      => __( 'Read More', 'author-website-templates' ),
				'condition' => [

					'slider_post_read_button' => 'true',
				],
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'slide_settings',
			[
				'label' => __( 'Slides Settings', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			]
		);
		$this->add_control(
			'slide_to_show',
			[
				'label' => __( 'Slide To Show', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'min' => 1,
				'max' => 12,
				'step' => 1,
				'default' => 1,
			]
		);
		$this->add_control(
			'margin',
			[
				'label' => __( 'Margin', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 1000,
						'step' => 5,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 30,
				],
			]
		);
		$this->add_control(
			'slider_smart_speed',
			[
				'label' => __( 'Smart Speed', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 2000,
						'step' => 10,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 400,
				],
			]
		);
		$this->add_control(
			'slider_fluid_speed',
			[
				'label' => __( 'Fluid Speed', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 2000,
						'step' => 10,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 400,
				],
			]
		);
		$this->add_control(
			'slider_autoplay_speed',
			[
				'label' => __( 'Auto Play Speed', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 2000,
						'step' => 10,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 400,
				],
			]
		);
		$this->add_control(
			'slider_nav_speed',
			[
				'label' => __( 'Nav Speed', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 2000,
						'step' => 10,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 400,
				],
			]
		);
		$this->add_control(
			'slider_dost_speed',
			[
				'label' => __( 'Dots Speed', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 2000,
						'step' => 10,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 400,
				],
			]
		);
		$this->add_control(
			'center_mode_true',
			[
				'label'        => __( 'Center Mode True?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Yes', 'author-website-templates' ),
				'label_off'    => __( 'No', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'autoplay_hover_push',
			[
				'label'        => __( 'Auto Play Hover', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Yes', 'author-website-templates' ),
				'label_off'    => __( 'No', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'nav',
			[
				'label'        => __( 'Navigation Arrow', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'dots',
			[
				'label'        => __( 'Dots', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'autoplay',
			[
				'label'        => __( 'Auto Play', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Yes', 'author-website-templates' ),
				'label_off'    => __( 'No', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'loop',
			[
				'label'        => __( 'Loop', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Yes', 'author-website-templates' ),
				'label_off'    => __( 'No', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'mouseDrag',
			[
				'label'        => __( 'Mouse Drag', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Yes', 'author-website-templates' ),
				'label_off'    => __( 'No', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'touchDrag',
			[
				'label'        => __( 'Touch Drag', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Yes', 'author-website-templates' ),
				'label_off'    => __( 'No', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',
			]
		);
		$this->add_control(
			'autoplayTimeout',
			[
				'label'     => __( 'Autoplay Timeout', 'author-website-templates' ),
				'type'      => Controls_Manager::SELECT,
				'default'   => '5000',
				'condition' => [
					'autoplay' => 'true',
				],
				'options' => [
					'5000'  => __( '5 Seconds', 'author-website-templates' ),
					'10000' => __( '10 Seconds', 'author-website-templates' ),
					'15000' => __( '15 Seconds', 'author-website-templates' ),
					'20000' => __( '20 Seconds', 'author-website-templates' ),
					'25000' => __( '25 Seconds', 'author-website-templates' ),
					'30000' => __( '30 Seconds', 'author-website-templates' ),
				],
			]
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'responsive_settings',
			[
				'label' => __( 'Responsive Settings', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			]
		);
		$this->add_control(
			'mobile_screen',
			[
				'label' => __( 'Mobile Screen for 360px', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'min' => 1,
				'max' => 12,
				'step' => 1,
				'default' => 1,
			]
		);
		$this->add_control(
			'mobile_margin',
			[
				'label' => __( 'Mobile Margin', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 1000,
						'step' => 5,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 30,
				],
			]
		);
		$this->add_control(
			'hr',
			[
				'type' => Controls_Manager::DIVIDER,
				'label'        => __( 'Label', 'author-website-templates' ),
			]
		);
		$this->add_control(
			'tablet_screen',
			[
				'label' => __( 'Tablet Screen for 768px', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'min' => 1,
				'max' => 12,
				'step' => 1,
				'default' => 1,

			]
		);
		$this->add_control(
			'tablet_margin',
			[
				'label' => __( 'Tablet Margin', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 1000,
						'step' => 5,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 30,
				],
			]
		);
		$this->add_control(
			'hr2',
			[
				'type' => Controls_Manager::DIVIDER,
				'label'        => __( 'Label', 'author-website-templates' ),
			]
		);
		$this->add_control(
			'medium_screen',
			[
				'label' => __( 'Tablet Screen for 992px - 1200', 'author-website-templates' ),
				'type' => Controls_Manager::NUMBER,
				'min' => 1,
				'max' => 12,
				'step' => 1,
				'default' => 1,

			]
		);
		$this->add_control(
			'medium_margin',
			[
				'label' => __( 'Tablet Margin', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 1000,
						'step' => 5,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 30,
				],
			]
		);

		$this->end_controls_section();
		/*Style Tab*/
		$this->start_controls_section(
			'slider_settings',
			[
				'label' => __( 'Slider Settings', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		$this->add_responsive_control(
			'slider_height',
			[
				'label' => __( 'Slider Height', 'author-website-templates' ),
				'type' => Controls_Manager::SLIDER,
				'size_units' => [ 'px' ],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 1000,
						'step' => 10,
					],
				],
				'default' => [
					'unit' => 'px',
					'size' => 650,
				],
				'selectors' => [
					'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__post-thumbnail' => 'height: {{SIZE}}{{UNIT}};',
					'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__post-thumbnail img' => 'min-height: {{SIZE}}{{UNIT}};'
				]
			]
		);
		$this->add_control(
			'show_slider_overly',
			[
				'label' => __( 'Show Slider Overlay', 'author-website-templates' ),
				'type' => Controls_Manager::SWITCHER,
				'default' => 'true',
				'return_value' => 'true',
			]
		);

		$this->add_group_control(
			Group_Control_Background::get_type(),
			[
				'name' => 'slider_overlay',
				'label' => __( 'Slider Overlay', 'author-website-templates' ),
				'types' => [ 'classic', 'gradient' ],
				'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__post-thumbnail .slider_overlay',
				'fields_options' => [
			        'background' => [
			            'label' => __( 'Slider Overlay Color', 'author-website-templates' ),
			        ],
			    ],
				'condition' => [
					'show_slider_overly' => 'true'
				]
			]
		);
		$this->end_controls_section();
		/*Style Tab*/
		$this->start_controls_section(
			'slider_content_box_style',
			[
				'label' => __( 'Slider Content Box', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			[
				'name' => 'slider_content_background',
				'show_label' => false,
				'label' => __( 'Slider Content Background', 'author-website-templates' ),
				'label_block'	=>	true,
				'types' => [ 'classic', 'gradient' ],
				'selector' => '{{WRAPPER}} .rswpthemes-awt-blog-posts-sliders .rswpthemes-awt-blog-posts-sliders__content >.container',
				'fields_options' => [
			        'background' => [
			            'label' => __( 'Slider Content Box Background', 'author-website-templates' ),
			        ],
			    ],
			]
		);
		$this->add_responsive_control(
			'slider_content_box_padding',
			[
				'label' => __( 'Content Box Padding', 'author-website-templates' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors' => [
					'{{WRAPPER}} .rswpthemes-awt-blog-posts-sliders .rswpthemes-awt-blog-posts-sliders__content >.container, .main-slider-area .rswpthemes-awt-blog-posts-sliders__content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
				'separator' => 'before',
			]
		);
		$this->add_responsive_control(
			'slider_content_box_margin',
			[
				'label' => __( 'Content Box Margin', 'author-website-templates' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors' => [
					'{{WRAPPER}} .rswpthemes-awt-blog-posts-sliders .rswpthemes-awt-blog-posts-sliders__content >.container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
				'separator' => 'before',
			]
		);
		$this->add_control(
			'slider_content_box_radious',
			[
				'label' => __( 'Border Radius', 'elementor' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%' ],
				'selectors' => [
					'{{WRAPPER}} .rswpthemes-awt-blog-posts-sliders .rswpthemes-awt-blog-posts-sliders__content >.container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);
		$this->add_control(
			'slider_content_vr_alignment',
			[
				'label'     => __( 'Content Alignment Verticle', 'author-website-templates' ),
				'type'      => Controls_Manager::SELECT,
				'default'   => 'center',
				'options' => [
					'flex-start'  => __( 'TOP', 'author-website-templates' ),
					'center' => __( 'Center', 'author-website-templates' ),
					'flex-end' => __( 'Bottom', 'author-website-templates' ),
				],
				'selectors' => [
					'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content' => 'align-items: {{VALUE}}'
				]
			]
		);
		$this->add_control(
			'slider_content_text_alignment',
			[
				'label'     => __( 'Text Alignment', 'author-website-templates' ),
				'type'      => Controls_Manager::SELECT,
				'default'   => 'center',
				'options' => [
					'left'  => __( 'Left', 'author-website-templates' ),
					'center' => __( 'Center', 'author-website-templates' ),
					'right' => __( 'Right', 'author-website-templates' ),
				],
				'selectors' => [
					'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content h2' => 'text-align: {{VALUE}}',
					'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta ul' => 'justify-content: {{VALUE}}',
				]
			]
		);

		$this->end_controls_section();

		$this->start_controls_section(
			'slider_thumnail',
			[
				'label' => __( 'Slider Thumbnail', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		$this->add_group_control(
			Group_Control_Css_Filter::get_type(),
			[
				'name' => 'slider_image',
				'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__post-thumbnail img',
			]
		);
		$this->add_group_control(
			Group_Control_Background::get_type(),
			[
				'name' => 'slider_thumbnail_background',
				'label' => __( 'Thumbnail Background', 'author-website-templates' ),
				'types' => [ 'classic', 'gradient' ],
				'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__post-thumbnail.backgrouncolor',
			]
		);
		$this->add_control(
			'slider_thumbnail_border_radius',
			[
				'label' => __( 'Border Radius', 'author-website-templates' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%' ],
				'selectors' => [
					'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__post-thumbnail' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);
		$this->end_controls_section();
		$this->start_controls_section(
			'slider_title_style',
			[
				'label' => __( 'Slider Title', 'author-website-templates' ),
				'tab'   => Controls_Manager::TAB_STYLE,
			]
		);
		$this->start_controls_tabs(
			'slider_title_tabs'
		);
		$this->start_controls_tab(
			'slider_title_style_normal',
			[
				'label' => __( 'Normal', 'author-website-templates' ),
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name' => 'slider_title_typography',
				'selector' => '{{WRAPPER}} .main-title',
			]
		);
		$this->add_control(
			'slider_heading_color',
			[
				'label' => __( 'Title Color', 'author-website-templates' ),
				'type' => Controls_Manager::COLOR,
				'default' => '',
				'selectors' => [
					'{{WRAPPER}} .main-title a' => 'color: {{VALUE}};',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			[
				'name' => 'slider_heading_text_shadow',
				'label' => __( 'Text Shadow', 'author-website-templates' ),
				'selector' => '{{WRAPPER}} .main-title a',
			]
		);
		$this->add_responsive_control(
			'slider_heading_padding',
			[
				'label' => __( 'Padding', 'author-website-templates' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors' => [
					'{{WRAPPER}} .main-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
				'separator' => 'before',
			]
		);
		$this->add_responsive_control(
			'slider_heading_margin',
			[
				'label' => __( 'Margin', 'author-website-templates' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors' => [
					'{{WRAPPER}} .main-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
				'separator' => 'before',
			]
		);
		$this->end_controls_tab();
		$this->start_controls_tab(
			'slider_title_style_hover',
			[
				'label' => __( 'Hover', 'author-website-templates' ),
			]
		);

		$this->add_control(
			'slider_heading_hover_color',
			[
				'label' => __( 'Title Color', 'author-website-templates' ),
				'type' => Controls_Manager::COLOR,
				'default' => '',
				'selectors' => [
					'{{WRAPPER}} .main-title a:hover' => 'color: {{VALUE}};',
				],
			]
		);
		$this->add_control(
			'show_slider_title_border',
			[
				'label'        => __( 'Show Border?', 'author-website-templates' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => __( 'Show', 'author-website-templates' ),
				'label_off'    => __( 'Hide', 'author-website-templates' ),
				'return_value' => 'true',
				'default'      => 'true',

			]
		);

		$this->add_control(
			'slider_heading_border_color',
			[
				'label' => __( 'Border Color', 'author-website-templates' ),
				'type' => Controls_Manager::COLOR,
				'default' => '',
				'condition' => [
					'show_slider_title_border' => 'true',
				],
				'selectors' => [
					'{{WRAPPER}} .main-title a:hover' => 'background-image: linear-gradient(to right, {{VALUE}} 0%, {{VALUE}} 100%);',
				],
			]
		);
		$this->add_group_control(
			Group_Control_Text_Shadow::get_type(),
			[
				'name' => 'slider_heading_text_shadow_hover',
				'label' => __( 'Text Shadow', 'author-website-templates' ),
				'selector' => '{{WRAPPER}} .main-title a:hover',
			]
		);
	$this->end_controls_tab();
	$this->end_controls_tabs();
	$this->end_controls_section();
	$this->start_controls_section(
		'slider_description_style',
		[
			'label' => __( 'Slider Description', 'author-website-templates' ),
			'tab'   => Controls_Manager::TAB_STYLE,

		]
	);
	$this->add_group_control(
		Group_Control_Typography::get_type(),
		[
			'name' => 'slider_description_typography',
			'selector' => '{{WRAPPER}} .excerpt',
		]
	);
	$this->add_control(
		'slider_description_color',
		[
			'label' => __( 'Description Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .excerpt' => 'color: {{VALUE}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Text_Shadow::get_type(),
		[
			'name' => 'slider_description_text_shadow',
			'label' => __( 'Text Shadow', 'author-website-templates' ),
			'selector' => '{{WRAPPER}} .excerpt',
		]
	);
	$this->add_responsive_control(
		'slider_description_padding',
		[
			'label' => __( 'Padding', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .excerpt' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);
	$this->add_responsive_control(
		'slider_description_margin',
		[
			'label' => __( 'Margin', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .excerpt' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);

	$this->end_controls_section();
	$this->start_controls_section(
		'slider_category_style',
		[
			'label' => __( 'Slider category', 'author-website-templates' ),
			'tab'   => Controls_Manager::TAB_STYLE,
			'condition'	=>	[
				'show_slider_category' => 'true',
			]
		]
	);
	$this->start_controls_tabs(
			'slider_category_tabs'
		);
	$this->start_controls_tab(
		'slider_category_normal_tab',
		[
			'label' => __( 'Normal', 'author-website-templates' ),
		]
	);
	$this->add_group_control(
		Group_Control_Typography::get_type(),
		[
			'name' => 'slider_category_typography',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a',
		]
	);
	$this->add_control(
		'slider_category_color',
		[
			'label' => __( 'Category Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a' => 'color: {{VALUE}};',
			],
		]
	);
	$this->add_control(
		'slider_category_bg_color',
		[
			'label' => __( 'Category Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a' => 'background: {{VALUE}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Border::get_type(),
		[
			'name' => 'slider_category_border',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a',
			'separator' => 'before',
		]
	);

	$this->add_control(
		'slider_category_border_radius',
		[
			'label' => __( 'Border Radius', 'elementor' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Text_Shadow::get_type(),
		[
			'name' => 'slider_category_text_shadow',
			'label' => __( 'Text Shadow', 'author-website-templates' ),
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a',
		]
	);
	$this->add_responsive_control(
		'slider_category_padding',
		[
			'label' => __( 'Padding', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);
	$this->add_responsive_control(
		'slider_category_margin',
		[
			'label' => __( 'Margin', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);
	$this->end_controls_tab();
	$this->start_controls_tab(
		'slider_category_hover_tab',
		[
			'label' => __( 'Hover', 'author-website-templates' ),
		]
	);
	$this->add_group_control(
		Group_Control_Typography::get_type(),
		[
			'name' => 'slider_category_hover_typography',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a:hover',
		]
	);
	$this->add_control(
		'slider_category_hover_color',
		[
			'label' => __( 'Category Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a:hover' => 'color: {{VALUE}};',
			],
		]
	);
	$this->add_control(
		'slider_category_hover_bg_color',
		[
			'label' => __( 'Category Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a:hover' => 'background: {{VALUE}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Border::get_type(),
		[
			'name' => 'slider_hover_category_border',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a:hover',
			'separator' => 'before',
		]
	);

	$this->add_control(
		'slider_category_hover_border_radius',
		[
			'label' => __( 'Border Radius', 'elementor' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__categories a:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
		]
	);
	$this->end_controls_tab();
	$this->end_controls_tabs();
	$this->end_controls_section();
	$this->start_controls_section(
		'slider_post_meta_style',
		[
			'label' => __( 'Slider Post Meta', 'author-website-templates' ),
			'tab'   => Controls_Manager::TAB_STYLE,
			'condition'	=>	[
				'show_slider_post_meta' => 'true',
			]
		]
	);
	$this->add_group_control(
		Group_Control_Typography::get_type(),
		[
			'name' => 'slider_post_meta_typography',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta li a',
		]
	);
	$this->add_control(
		'slider_post_meta_color',
		[
			'label' => __( 'Meta Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta li a, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta li span' => 'color: {{VALUE}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Text_Shadow::get_type(),
		[
			'name' => 'slider_post_meta_text_shadow',
			'label' => __( 'Text Shadow', 'author-website-templates' ),
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta li',
		]
	);
	$this->add_responsive_control(
		'slider_post_meta_padding',
		[
			'label' => __( 'Padding', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);
	$this->add_responsive_control(
		'slider_post_meta_margin',
		[
			'label' => __( 'Margin', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__blog-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);

	$this->end_controls_section();

	$this->start_controls_section(
		'slider_button_style',
		[
			'label' => __( 'Slider button', 'author-website-templates' ),
			'tab'   => Controls_Manager::TAB_STYLE,
		]
	);
	$this->start_controls_tabs(
			'slider_button_style_tab'
		);
	$this->start_controls_tab(
		'slider_button_normal',
		[
			'label' => __( 'Normal', 'author-website-templates' ),
		]
	);
	$this->add_group_control(
		Group_Control_Typography::get_type(),
		[
			'name' => 'slider_button_typography',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a',
		]
	);
	$this->add_control(
		'slider_button_color',
		[
			'label' => __( 'Button Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a' => 'color: {{VALUE}};',
			],
		]
	);
	$this->add_control(
		'slider_button_bg_color',
		[
			'label' => __( 'Button Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a' => 'background: {{VALUE}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Border::get_type(),
		[
			'name' => 'slider_button_border',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a',
			'separator' => 'before',
		]
	);

	$this->add_control(
		'slider_button_border_radius',
		[
			'label' => __( 'Border Radius', 'elementor' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Text_Shadow::get_type(),
		[
			'name' => 'slider_button_text_shadow',
			'label' => __( 'Text Shadow', 'author-website-templates' ),
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a',
		]
	);
	$this->add_responsive_control(
		'slider_button_padding',
		[
			'label' => __( 'Padding', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);
	$this->add_responsive_control(
		'slider_button_margin',
		[
			'label' => __( 'Margin', 'author-website-templates' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', 'em', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
			'separator' => 'before',
		]
	);
	$this->end_controls_tab();
	$this->start_controls_tab(
		'slider_button_hover',
		[
			'label' => __( 'Hover', 'author-website-templates' ),
		]
	);
	$this->add_group_control(
		Group_Control_Typography::get_type(),
		[
			'name' => 'slider_button_hover_typography',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a:hover, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a.active_button',
		]
	);
	$this->add_control(
		'slider_button_hover_color',
		[
			'label' => __( 'Button Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a:hover, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a.active_button' => 'color: {{VALUE}};',
			],
		]
	);
	$this->add_control(
		'slider_button_bg_hover_color',
		[
			'label' => __( 'Button Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a:hover, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a.active_button' => 'background: {{VALUE}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Border::get_type(),
		[
			'name' => 'slider_button_hover_border',
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a:hover, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a.active_button',
			'separator' => 'before',
		]
	);

	$this->add_control(
		'slider_button_border_radius_hover',
		[
			'label' => __( 'Border Radius', 'elementor' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a:hover, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a.active_button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Text_Shadow::get_type(),
		[
			'name' => 'slider_button_text_shadow_hover',
			'label' => __( 'Text Shadow', 'author-website-templates' ),
			'selector' => '{{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a:hover, {{WRAPPER}} .main-slider-area .rswpthemes-awt-blog-posts-sliders__content .welcome-button a.active_button',
		]
	);
	$this->end_controls_tab();
	$this->end_controls_tabs();
	$this->end_controls_section();
	$this->start_controls_section(
		'slider_navigation_style',
		[
			'label' => __( 'Slider navigation', 'author-website-templates' ),
			'tab'   => Controls_Manager::TAB_STYLE,
		]
	);

	$this->add_control(
		'slider_navigation_color',
		[
			'label' => __( 'Navigation Color', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-nav button' => 'color: {{VALUE}} !important;',
			],
		]
	);
	$this->add_control(
		'slider_navigation_bg_color',
		[
			'label' => __( 'Navigation Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-nav button' => 'background: {{VALUE}} !important;',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Border::get_type(),
		[
			'name' => 'slider_navigation_border',
			'selector' => '{{WRAPPER}} .main-slider-area .owl-nav button',
			'separator' => 'before',
		]
	);

	$this->add_control(
		'slider_navigation_border_radius',
		[
			'label' => __( 'Border Radius', 'elementor' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-nav button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
		]
	);
	$this->add_control(
		'slider_navigation_width',
		[
			'label' => __( 'Width', 'author-website-templates' ),
			'type' => Controls_Manager::SLIDER,
			'size_units' => [ 'px' ],
			'range' => [
				'px' => [
					'min' => 0,
					'max' => 100,
					'step' => 1,
				],
			],
			'default' => [
				'unit' => 'px',
				'size' => 40,
			],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-nav button' => 'width: {{SIZE}}{{UNIT}};',
			]
		]
	);
	$this->add_control(
		'slider_navigation_height',
		[
			'label' => __( 'Height', 'author-website-templates' ),
			'type' => Controls_Manager::SLIDER,
			'size_units' => [ 'px' ],
			'range' => [
				'px' => [
					'min' => 0,
					'max' => 100,
					'step' => 1,
				],
			],
			'default' => [
				'unit' => 'px',
				'size' => 40,
			],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-nav button' => 'height: {{SIZE}}{{UNIT}};',
			]
		]
	);

	$this->end_controls_section();
	$this->start_controls_section(
		'slider_dots_style',
		[
			'label' => __( 'Slider Dots', 'author-website-templates' ),
			'tab'   => Controls_Manager::TAB_STYLE,
		]
	);

	$this->add_control(
		'slider_dots_bg_color',
		[
			'label' => __( 'Dots Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-dots button' => 'background: {{VALUE}} !important;',
			],
		]
	);
	$this->add_control(
		'slider_dots_active_bg_color',
		[
			'label' => __( 'Active Background', 'author-website-templates' ),
			'type' => Controls_Manager::COLOR,
			'default' => '',
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-dots button.active' => 'background: {{VALUE}} !important;',
			],
		]
	);
	$this->add_group_control(
		Group_Control_Border::get_type(),
		[
			'name' => 'slider_dots_border',
			'selector' => '{{WRAPPER}} .main-slider-area .owl-dots button',
			'separator' => 'before',
		]
	);

	$this->add_control(
		'slider_dots_border_radius',
		[
			'label' => __( 'Border Radius', 'elementor' ),
			'type' => Controls_Manager::DIMENSIONS,
			'size_units' => [ 'px', '%' ],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-dots button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
			],
		]
	);
	$this->add_control(
		'slider_dots_width',
		[
			'label' => __( 'Width', 'author-website-templates' ),
			'type' => Controls_Manager::SLIDER,
			'size_units' => [ 'px' ],
			'range' => [
				'px' => [
					'min' => 0,
					'max' => 50,
					'step' => 1,
				],
			],
			'default' => [
				'unit' => 'px',
				'size' => 10,
			],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-dots button' => 'width: {{SIZE}}{{UNIT}};',
			]
		]
	);
	$this->add_control(
		'slider_dots_height',
		[
			'label' => __( 'Height', 'author-website-templates' ),
			'type' => Controls_Manager::SLIDER,
			'size_units' => [ 'px' ],
			'range' => [
				'px' => [
					'min' => 0,
					'max' => 50,
					'step' => 1,
				],
			],
			'default' => [
				'unit' => 'px',
				'size' => 10,
			],
			'selectors' => [
				'{{WRAPPER}} .main-slider-area .owl-dots button' => 'height: {{SIZE}}{{UNIT}};',
			]
		]
	);

	$this->end_controls_section();

	}

	/**
	 * Render oEmbed 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();
		$sliderDynamicId 		   = rand(10, 100000);
		$nav             		   = $settings['nav'] ? $settings['nav'] : 'false';
		$dots            		   = $settings['dots'] ? $settings['dots'] : 'false';
		$autoplay        		   = $settings['autoplay'] ? $settings['autoplay'] : 'false';
		$autoplayhoverpush         = $settings['autoplay_hover_push'] ? $settings['autoplay_hover_push'] : 'true';
		$loop            		   = $settings['loop'] ? $settings['loop'] : 'false';
		$mouseDrag       		   = $settings['mouseDrag'] ? $settings['mouseDrag'] : 'false';
		$touchDrag       		   = $settings['touchDrag'] ? $settings['touchDrag'] : 'false';
		$smartspeed       		   = $settings['slider_smart_speed'] ? $settings['slider_smart_speed'] : '250';
		$fluidspeed       		   = $settings['slider_fluid_speed'] ? $settings['slider_fluid_speed'] : 'false';
		$autoplayspeed       	   = $settings['slider_autoplay_speed'] ? $settings['slider_autoplay_speed'] : 'false';
		$navspeed       	       = $settings['slider_nav_speed'] ? $settings['slider_nav_speed'] : 'false';
		$dotspeed       	       = $settings['slider_dost_speed'] ? $settings['slider_dost_speed'] : 'false';
		$center_mode_true       	       = $settings['center_mode_true'] ? $settings['center_mode_true'] : 'false';
		$autoplayTimeout 		   = $settings['autoplayTimeout'] ? $settings['autoplayTimeout'] : '0';
		$slide_to_show   		   = $settings['slide_to_show'];
		$slide_to_show_on_mobile   = $settings['mobile_screen'];
		$slide_to_show_on_tablet   = $settings['tablet_screen'];
		$slide_to_show_on_medium   = $settings['medium_screen'];
		$item_margin     		   = $settings['margin'];
		$item_margin_on_mobile     = $settings['mobile_margin'];
		$item_margin_on_tablet     = $settings['tablet_margin'];
		$item_margin_on_medium     = $settings['medium_margin'];
		$this->add_render_attribute(
            'slider-wrapper',
            [
                'class'                 => 'active-main-slider owl-carousel',
                'id'                    => 'active-mainslider-'.esc_attr($sliderDynamicId),
                'data-items'       		=> $slide_to_show,
                'data-mobile-items'     => $slide_to_show_on_mobile,
                'data-tablet-items'     => $slide_to_show_on_tablet,
                'data-medium-items'     => $slide_to_show_on_medium,
                'data-dots'             => $dots,
                'data-nav'              => $nav,
                'data-loop'             => $loop,
                'data-autoplay'         => $autoplay,
                'data-autoplay-timeout' => $autoplayTimeout,
                'data-mouse-drag'       => $mouseDrag,
                'data-touch-drag'       => $touchDrag,
                'data-margin'           => $item_margin['size'],
                'data-mobile-margin'    => $item_margin_on_mobile['size'],
                'data-tablet-margin'    => $item_margin_on_tablet['size'],
                'data-medium-margin'    => $item_margin_on_medium['size'],
                'data-smart-speed'    => $smartspeed['size'],
                'data-autoplay-speed'    => $autoplayspeed['size'],
                'data-fluid-speed'    => $fluidspeed['size'],
                'data-nav-speed'    => $navspeed['size'],
                'data-dot-speed'    => $dotspeed['size'],
                'data-auto-hover'    => $autoplayhoverpush,
                'data-center-mode'    => $center_mode_true,
            ]
        );
		$rswpthemes_awt_get_categories = $settings['select_categories'];
		$slider_post_count = $settings['slider_post_count'];
		$authorIn = $settings['post_slider_author_in'];
		$postOffset = $settings['post_slider_offset'];
		$excludeCategories = $settings['post_slider_exclude_categories'];
		$excludeAuthors = $settings['post_slider_author_not_in'];
		$ignoreStickyPosts = $settings['slider_ignore_sticky_post'];
		$get_post_args = array(
			'post_type' => array('post'),
			'posts_per_page' => $slider_post_count,
		);
		if (!empty($rswpthemes_awt_get_categories)) {
			$rswpthemes_awt_cat_array_to_string = implode(',', $rswpthemes_awt_get_categories);
			$get_post_args['category_name'] = $rswpthemes_awt_cat_array_to_string;
		}
		if (!empty($authorIn)) {
			$get_post_args['author_in'] = explode(',' , $authorIn);
		}
		if ( 0 != $postOffset ) {
			$get_post_args['offset'] = absint($postOffset);
		}
		if (!empty($excludeCategories)) {
			$get_post_args['category__not_in'] = explode(',' , $excludeCategories);
		}
		if (!empty($excludeAuthors)) {
			$get_post_args['author__not_in'] = explode(',' , $excludeAuthors);
		}
		if ('true' === $ignoreStickyPosts) {
			$get_post_args['post__not_in'] = get_option('sticky_posts');
		}
		$slider_V_alignment = $settings['slider_content_vr_alignment'];
		?>
		<section class="main-slider-area">
			<div <?php echo $this->get_render_attribute_string('slider-wrapper'); ?>>
			<?php
			$get_post_query = new WP_Query($get_post_args);
			while ($get_post_query->have_posts()) :
				$get_post_query->the_post();
			?>
			<div class="rswpthemes-awt-blog-posts-sliders">
				<?php $this->rswpthemes_awt_render_post_thumbnail(); ?>
			    <div class="rswpthemes-awt-blog-posts-sliders__content <?php echo esc_attr($slider_V_alignment);?>">
			         <div class="container">
				         <?php
				        $this->rswpthemes_awt_render_category();
				    	$this->rswpthemes_awt_render_title();
				    	$this->rswpthemes_awt_render_post_meta();
				    	$this->rswpthemes_awt_render_excerpt();
				    	$this->rswpthemes_awt_render_post_readmore_button();
				    	?>
			        </div>
			    </div>
			</div>
			<?php
			 endwhile;  wp_reset_postdata();
			 ?>
			</div>
	    </section>
		<?php
	}
	private function rswpthemes_awt_render_post_thumbnail(){
		$settings = $this->get_settings_for_display();
		$post_image_show  = $settings['post_image_show'];
		$rswpthemes_awt_image_size = $settings['sliderimage_size'];
		$show_slider_overlay = $settings['show_slider_overly'];
		$nopost_thumbnail_class = 'true' === $post_image_show ? '' : ' backgrouncolor'; ?>
	    <div class="rswpthemes-awt-blog-posts-sliders__post-thumbnail<?php echo esc_attr( $nopost_thumbnail_class );?>">
	    	<a href="<?php the_permalink();?>">
		    	<?php if ('true' === $show_slider_overlay):?>
		    	<div class="slider_overlay"></div>
		    	<?php endif; ?>
		        <?php
		        if ('true' === $post_image_show) :
		        	if (get_transient( 'rswpthemes_awt_image_size' )) {
		        		$rswpthemes_awt_get_image_size = get_transient( 'rswpthemes_awt_image_size' );
		        	}else{
		        		$rswpthemes_awt_get_image_size = 'full';
		        	}
		         the_post_thumbnail( $rswpthemes_awt_get_image_size );
		     	endif;
		         ?>
	     	</a>
	    </div>
	   <?php
	}
	private function rswpthemes_awt_render_title(){
		$settings = $this->get_settings_for_display();
		$post_title_show = $settings['post_slider_title_show'];
		$show_title_border = $settings['show_slider_title_border'];
		if ('true' === $post_title_show) :
		?>
		<h2 class="main-title"><a class="<?php echo ('true' === $show_title_border ? esc_attr('border_on_hover') : esc_attr('no_border_on_hover'));?>" href="<?php the_permalink();?>"><?php the_title(); ?></a></h2>
		<?php
		endif;
	}
	private function rswpthemes_awt_render_category(){
		$settings = $this->get_settings_for_display();
		$show_slider_category = $settings['show_slider_category'];
		if('true' === $show_slider_category) : ?>
         	<div class="rswpthemes-awt-blog-posts-sliders__categories">
				<?php
				$categories_list = get_the_category_list( esc_html__( ' ', 'author-website-templates' ) );
				if ( $categories_list ) {
					/* translators: 1: list of categories. */
					printf( '<span class="cat-links">' . __( '%1$s', 'author-website-templates' ) . '</span>', $categories_list ); // WPCS: XSS OK.
				}
				?>
			</div>
		<?php endif;
	}
	private function rswpthemes_awt_render_post_meta(){
		$settings = $this->get_settings_for_display();
		$show_slider_post_meta = $settings['show_slider_post_meta'];
		$get_slider_post_meta_data = is_array($settings['slider_post_meta_data']) ? implode(',', $settings['slider_post_meta_data']) : array();
		$slider_post_meta_data = (!empty($get_slider_post_meta_data) ? explode(',', $get_slider_post_meta_data) : array());

		if ('true' === $show_slider_post_meta && !empty($slider_post_meta_data)) :?>
        <div class="rswpthemes-awt-blog-posts-sliders__blog-meta">
			<ul>
			<?php if(in_array('author', $slider_post_meta_data)) : ?>
			<li class="author-meta"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ) ); ?>"><span class="post-author-image"><?php echo get_avatar( get_the_author_meta('ID'), 30); ?></span> <?php echo esc_html( get_the_author() ); ?></a></li>
			<?php endif;
			if(in_array('date', $slider_post_meta_data)) :
			?>
			<li><a href="#"> <span class="rswpthemes-icon icon-calendar-days-solid"></span><?php rswpthemes_awt_posted_on(); ?></a></li>
			<?php endif;
			if(in_array('comments', $slider_post_meta_data)) :
			?>
			<li><span class="rswpthemes-icon icon-comment-solid"></span> <?php rswpthemes_awt_comment_popuplink(); ?></li>
			<?php endif; ?>
			</ul>
		</div>
		<?php endif;
	}
	private function rswpthemes_awt_render_excerpt(){
		$settings = $this->get_settings_for_display();
		$slider_excerpt_length 			   = $settings['slider_excerpt_length'];
		$show_slider_post_excerpt = $settings['show_slider_post_excerpt'];
		if ('true' === $show_slider_post_excerpt) :?>
	    	<p class="excerpt"> <?php echo esc_html( rswpthemes_awt_get_excerpt( $slider_excerpt_length ) ); ?> </p>
		<?php endif;
	}
	private function rswpthemes_awt_render_post_readmore_button(){
		$settings = $this->get_settings_for_display();
		$slider_post_read_button = $settings['slider_post_read_button'];
		$button_text  = $settings['button_text'];
		if('true' === $slider_post_read_button): ?>
        <div class="welcome-button">
            <a href="<?php the_permalink();?>" class="btn btn-default button-primary"><?php echo esc_html($button_text); ?></a>
        </div>
    	<?php endif;
	}

}