<?php

/*
Widget Name: Posts Multislider
Description: Display blog posts or custom post types as a slider of list of posts.
Author: ThemesFlat
Author URI: https://www.themesflatthemes.com
*/
namespace ThemesflatAddons\Widgets;

use  Elementor\Widget_Base ;
use  Elementor\Controls_Manager ;
use  Elementor\Scheme_Color ;
use  Elementor\Group_Control_Typography ;
use  Elementor\Group_Control_Image_Size ;
use  Elementor\Scheme_Typography ;
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
// Exit if accessed directly
class TFL_Posts_Multislider_Widget extends TFL_Widget_Base
{
    public function get_name()
    {
        return 'tfl-posts-multislider';
    }
    
    public function get_title()
    {
        return __( 'Posts Multislider', 'themesflat' );
    }
    
    public function get_icon()
    {
        return 'tfl-icon-posts-carousel';
    }
    
    public function get_categories()
    {
        return array( 'themesflat-addons' );
    }
    
    public function get_custom_help_url()
    {
        return 'https://themesflatelementor.com/docs/themesflat-addons/core-addons/posts-multislider/';
    }
    
    public function get_script_depends()
    {
        return [
            'tfl-jquery-slick',
            'tfl-frontend-scripts',
            'tfl-carousel-helper-scripts',
            'tfl-posts-multislider-scripts'
        ];
    }
    
    public function get_style_depends()
    {
        return [
            'tfl-icomoon-styles',
            'tfl-slick-carousel-styles',
            'tfl-frontend-styles',
            'tfl-slick-carousel-custom-styles',
            'tfl-posts-sliders-styles'
        ];
    }
    
    protected function register_controls()
    {
        $this->start_controls_section( 'section_query', [
            'label' => __( 'Posts Query', 'themesflat' ),
        ] );
        $this->add_control( 'query_type', [
            'label'   => __( 'Source', 'themesflat' ),
            'type'    => Controls_Manager::SELECT,
            'options' => array(
            'custom_query'  => __( 'Custom Query', 'themesflat' ),
            'current_query' => __( 'Current Query', 'themesflat' ),
            'related'       => __( 'Related', 'themesflat' ),
        ),
            'default' => 'custom_query',
        ] );
        $this->add_control( 'post_types', [
            'label'     => __( 'Post Types', 'themesflat' ),
            'type'      => Controls_Manager::SELECT2,
            'default'   => 'post',
            'options'   => tfl_get_all_post_type_options(),
            'multiple'  => true,
            'condition' => [
            'query_type' => 'custom_query',
        ],
        ] );
        $this->add_control( 'taxonomies', [
            'type'        => Controls_Manager::SELECT2,
            'label'       => __( 'Choose the taxonomies to display related posts.', 'themesflat' ),
            'label_block' => true,
            'description' => __( 'Choose the taxonomies to be used for displaying posts related to current post, page or custom post type.', 'themesflat' ),
            'options'     => tfl_get_taxonomies_map(),
            'default'     => 'category',
            'multiple'    => true,
            'condition'   => [
            'query_type' => 'related',
        ],
        ] );
        $this->add_control( 'tax_query', [
            'label'       => __( 'Taxonomies', 'themesflat' ),
            'type'        => Controls_Manager::SELECT2,
            'options'     => tfl_get_all_taxonomy_options(),
            'multiple'    => true,
            'label_block' => true,
            'condition'   => [
            'query_type' => 'custom_query',
        ],
        ] );
        $this->add_control( 'post_in', [
            'label'       => __( 'Post In', 'themesflat' ),
            'description' => __( 'Provide a comma separated list of Post IDs to display in the grid.', 'themesflat' ),
            'type'        => Controls_Manager::TEXT,
            'label_block' => true,
            'condition'   => [
            'query_type' => 'custom_query',
        ],
        ] );
        $this->add_control( 'posts_per_page', [
            'label'     => __( 'Posts Per Page', 'themesflat' ),
            'type'      => Controls_Manager::NUMBER,
            'min'       => 1,
            'max'       => 50,
            'step'      => 1,
            'default'   => 6,
            'condition' => [
            'query_type' => [ 'custom_query', 'related' ],
        ],
        ] );
        $this->add_control( 'advanced', [
            'label'     => __( 'Advanced', 'themesflat' ),
            'type'      => Controls_Manager::HEADING,
            'condition' => [
            'query_type' => [ 'custom_query', 'related' ],
        ],
        ] );
        $this->add_control( 'orderby', [
            'label'     => __( 'Order By', 'themesflat' ),
            'type'      => Controls_Manager::SELECT,
            'options'   => array(
            'none'          => __( 'No order', 'themesflat' ),
            'ID'            => __( 'Post ID', 'themesflat' ),
            'author'        => __( 'Author', 'themesflat' ),
            'title'         => __( 'Title', 'themesflat' ),
            'date'          => __( 'Published date', 'themesflat' ),
            'modified'      => __( 'Modified date', 'themesflat' ),
            'parent'        => __( 'By parent', 'themesflat' ),
            'rand'          => __( 'Random order', 'themesflat' ),
            'comment_count' => __( 'Comment count', 'themesflat' ),
            'menu_order'    => __( 'Menu order', 'themesflat' ),
            'post__in'      => __( 'By include order', 'themesflat' ),
        ),
            'default'   => 'date',
            'condition' => [
            'query_type' => [ 'custom_query', 'related' ],
        ],
        ] );
        $this->add_control( 'order', [
            'label'     => __( 'Order', 'themesflat' ),
            'type'      => Controls_Manager::SELECT,
            'options'   => array(
            'ASC'  => __( 'Ascending', 'themesflat' ),
            'DESC' => __( 'Descending', 'themesflat' ),
        ),
            'default'   => 'DESC',
            'condition' => [
            'query_type' => [ 'custom_query', 'related' ],
        ],
        ] );
        $this->add_control( 'offset', [
            'label'       => __( 'Offset', 'themesflat' ),
            'description' => __( 'Number of posts to skip or pass over.', 'themesflat' ),
            'type'        => Controls_Manager::NUMBER,
            'default'     => 0,
            'condition'   => [
            'query_type' => 'custom_query',
        ],
        ] );
        $this->add_control( 'upgrade_notice', [
            'type'      => Controls_Manager::RAW_HTML,
            'separator' => 'before',
            'raw'       => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Themesflat Addons for Elementor <i>Premium</i></strong>. ', 'themesflat' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://themesflatelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'themesflat' ) . '</a></p></div>',
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_post_content', [
            'label' => __( 'Post Content', 'themesflat' ),
        ] );
        $this->add_control( 'taxonomy_chosen', [
            'label'       => __( 'Choose the taxonomy to display info.', 'themesflat' ),
            'description' => __( 'Choose the taxonomy to use for display of taxonomy information for posts/custom post types.', 'themesflat' ),
            'type'        => Controls_Manager::SELECT,
            'label_block' => true,
            'default'     => 'category',
            'options'     => tfl_get_taxonomies_map(),
        ] );
        $this->add_control( 'display_thumbnail', [
            'label'        => __( 'Display post thumbnail?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
        ] );
        $this->add_group_control( Group_Control_Image_Size::get_type(), [
            'name'      => 'thumbnail',
            'label'     => __( 'Image Size', 'themesflat' ),
            'default'   => 'large',
            'exclude'   => [ 'custom' ],
            'condition' => [
            'display_thumbnail' => 'yes',
        ],
        ] );
        $this->add_control( 'image_linkable', [
            'label'        => __( 'Link Images to Posts?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
            'condition'    => [
            'display_thumbnail' => 'yes',
        ],
        ] );
        $this->add_control( 'post_link_new_window', [
            'label'        => __( 'Open post links in new window?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => '',
        ] );
        $this->add_control( 'display_title', [
            'label'        => __( 'Display posts title?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
        ] );
        $this->add_control( 'display_taxonomy', [
            'label'        => __( 'Display taxonomy info?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
        ] );
        $this->add_control( 'display_author', [
            'label'        => __( 'Display post author info?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
        ] );
        $this->add_control( 'display_post_date', [
            'label'        => __( 'Display post date info?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
        ] );
        $this->add_control( 'display_comments', [
            'label'        => __( 'Display post comments?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
        ] );
        $this->add_control( 'display_summary', [
            'label'        => __( 'Display post excerpt/summary?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'no',
        ] );
        $this->add_control( 'display_read_more', [
            'label'        => __( 'Display read more link to the post/portfolio?', 'themesflat' ),
            'type'         => Controls_Manager::SWITCHER,
            'label_on'     => __( 'Yes', 'themesflat' ),
            'label_off'    => __( 'No', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'no',
        ] );
        $this->add_control( 'read_more_text', [
            'label'       => __( 'Read more text', 'themesflat' ),
            'type'        => Controls_Manager::TEXT,
            "description" => __( 'Specify the text for the read more link/button', 'themesflat' ),
            'default'     => __( 'Read More', 'themesflat' ),
            'condition'   => [
            'display_read_more' => [ 'yes' ],
        ],
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_slider_settings', [
            'label' => __( 'Multislider Settings', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_SETTINGS,
        ] );
        $slider_styles = array(
            'style-1' => __( 'Slider Style 1', 'themesflat' ),
            'style-2' => __( 'Slider Style 2', 'themesflat' ),
            'style-3' => __( 'Slider Style 3', 'themesflat' ),
        );
        $this->add_control( 'slider_style', [
            'type'    => Controls_Manager::SELECT,
            'label'   => __( 'Choose Slider Style', 'themesflat' ),
            'options' => $slider_styles,
            'default' => 'style-1',
        ] );
        $this->add_control( 'text_alignment', [
            'type'      => Controls_Manager::SELECT,
            'label'     => __( 'Choose Text Alignment', 'themesflat' ),
            'options'   => array(
            'align-top-left'      => __( 'Top Left', 'themesflat' ),
            'align-middle-left'   => __( 'Middle Left', 'themesflat' ),
            'align-bottom-left'   => __( 'Bottom Left', 'themesflat' ),
            'align-top-center'    => __( 'Top Center', 'themesflat' ),
            'align-middle-center' => __( 'Middle Center', 'themesflat' ),
            'align-bottom-center' => __( 'Bottom Center', 'themesflat' ),
            'align-top-right'     => __( 'Top Right', 'themesflat' ),
            'align-middle-right'  => __( 'Middle Right', 'themesflat' ),
            'align-bottom-right'  => __( 'Bottom Right', 'themesflat' ),
        ),
            'default'   => 'align-bottom-left',
            'condition' => [
            'slider_style' => [ 'style-1' ],
        ],
        ] );
        $this->add_control( 'bottom_text_alignment', [
            'type'      => Controls_Manager::SELECT,
            'label'     => __( 'Choose Bottom Text Alignment', 'themesflat' ),
            'options'   => array(
            'align-left'   => __( 'Align Left', 'themesflat' ),
            'align-center' => __( 'Align Center', 'themesflat' ),
            'align-right'  => __( 'Align Right', 'themesflat' ),
        ),
            'default'   => 'align-left',
            'condition' => [
            'slider_style' => [ 'style-2', 'style-3', 'style-4' ],
        ],
        ] );

        $this->add_responsive_control( 'gutter', [
            'label'      => __( 'Spacing between items', 'themesflat' ),
            'type'       => Controls_Manager::SLIDER,
            'size_units' => [ 'px' ],
            'default'    => [
            'size' => 10,
        ],
            'range'      => [
            'px' => [
            'min' => 0,
            'max' => 50,
        ],
        ],
            'selectors'  => [
            '{{WRAPPER}} .tfl-posts-multislider .slick-slide' => 'margin: 0 {{SIZE}}{{UNIT}};',
            '{{WRAPPER}} .tfl-posts-multislider .slick-list'  => 'margin: 0 -{{SIZE}}{{UNIT}};',
        ],
        ] );
        $this->add_control( 'image_height', [
            'label'   => __( 'Image height', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'default' => 500,
        ] );
        $this->add_control( 'arrows', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
            'label'        => __( 'Prev/Next Arrows?', 'themesflat' ),
        ] );
        $this->add_control( 'dots', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'no',
            'label'        => __( 'Show dot indicators for navigation?', 'themesflat' ),
        ] );
        $this->add_control( 'pause_on_hover', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
            'label'        => __( 'Pause on Hover?', 'themesflat' ),
        ] );
        $this->add_control( 'pause_on_action', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
            "description"  => __( "Pause the slideshow when interacting with control elements.", "themesflat" ),
            "label"        => __( "Pause on action?", "themesflat" ),
        ] );
        $this->add_control( 'loop', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'yes',
            "description"  => __( "Should the animation loop?", "themesflat" ),
            "label"        => __( "Loop", "themesflat" ),
        ] );
        $this->add_control( 'autoplay', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'no',
            'label'        => __( 'Autoplay?', 'themesflat' ),
            'description'  => __( 'Should the slider autoplay as in a slideshow.', 'themesflat' ),
        ] );
        $this->add_control( 'autoplay_speed', [
            'label'   => __( 'Autoplay speed in ms', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'default' => 3000,
        ] );
        $this->add_control( 'animation_speed', [
            'label'   => __( 'Autoplay animation speed in ms', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'default' => 300,
        ] );
        $this->add_control( 'adaptive_height', [
            'type'         => Controls_Manager::SWITCHER,
            'label_off'    => __( 'No', 'themesflat' ),
            'label_on'     => __( 'Yes', 'themesflat' ),
            'return_value' => 'yes',
            'default'      => 'no',
            'label'        => __( 'Adaptive Height?', 'themesflat' ),
            'description'  => __( 'Enables adaptive height for single slide horizontal multisliders.', 'themesflat' ),
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_slider_arrows', [
            'label'     => __( 'Slider Arrow Settings', 'themesflat' ),
            'tab'       => Controls_Manager::TAB_SETTINGS,
            'condition' => [
            'arrows' => [ 'yes' ],
        ],
        ] );
        $this->add_control( 'arrows_placement', [
            'type'         => Controls_Manager::SELECT,
            'label'        => __( 'Placement', 'themesflat' ),
            'options'      => array(
            'middle-center' => __( 'Middle Center', 'themesflat' ),
            'bottom-center' => __( 'Bottom Center', 'themesflat' ),
            'top-left'      => __( 'Top Left', 'themesflat' ),
            'top-right'     => __( 'Top Right', 'themesflat' ),
            'bottom-left'   => __( 'Bottom Left', 'themesflat' ),
            'bottom-right'  => __( 'Bottom Right', 'themesflat' ),
        ),
            'default'      => 'middle-center',
            'prefix_class' => 'tfl-slider-arrow-placement-',
        ] );
        $this->add_control( 'arrows_shape', [
            'type'         => Controls_Manager::SELECT,
            'label'        => __( 'Shape', 'themesflat' ),
            'options'      => array(
            'square'          => __( 'Square', 'themesflat' ),
            'rounded-corners' => __( 'Square with Rounded Corners', 'themesflat' ),
            'circle'          => __( 'Circle', 'themesflat' ),
        ),
            'default'      => 'circle',
            'prefix_class' => 'tfl-slider-arrow-shape-',
        ] );
        $this->add_control( 'arrows_color', [
            'type'         => Controls_Manager::SELECT,
            'label'        => __( 'Color', 'themesflat' ),
            'options'      => array(
            'dark'  => __( 'Dark', 'themesflat' ),
            'light' => __( 'Light', 'themesflat' ),
        ),
            'default'      => 'dark',
            'prefix_class' => 'tfl-slider-arrow-color-',
        ] );
        $this->add_control( 'arrows_visibility', [
            'type'         => Controls_Manager::SELECT,
            'label'        => __( 'Visibility', 'themesflat' ),
            'options'      => array(
            'always'   => __( 'Show Always', 'themesflat' ),
            'on-hover' => __( 'Show on Hover', 'themesflat' ),
        ),
            'default'      => 'always',
            'prefix_class' => 'tfl-slider-arrow-visibility-',
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_responsive', [
            'label' => __( 'Responsive Options', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_SETTINGS,
        ] );
        $this->add_control( 'heading_desktop', [
            'label'     => __( 'Desktop', 'themesflat' ),
            'type'      => Controls_Manager::HEADING,
            'separator' => 'after',
        ] );
        $this->add_control( 'display_columns', [
            'label'   => __( 'Columns per row', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'min'     => 1,
            'max'     => 5,
            'step'    => 1,
            'default' => 3,
        ] );
        $this->add_control( 'scroll_columns', [
            'label'   => __( 'Columns to scroll', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'min'     => 1,
            'max'     => 5,
            'step'    => 1,
            'default' => 3,
        ] );
        $this->add_control( 'heading_tablet', [
            'label'     => __( 'Tablet', 'themesflat' ),
            'type'      => Controls_Manager::HEADING,
            'separator' => 'after',
        ] );
        $this->add_control( 'tablet_display_columns', [
            'label'   => __( 'Columns per row', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'min'     => 1,
            'max'     => 5,
            'step'    => 1,
            'default' => 2,
        ] );
        $this->add_control( 'tablet_scroll_columns', [
            'label'   => __( 'Columns to scroll', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'min'     => 1,
            'max'     => 5,
            'step'    => 1,
            'default' => 2,
        ] );
        $this->add_control( 'tablet_width', [
            'label'       => __( 'Tablet Resolution', 'themesflat' ),
            'description' => __( 'The resolution to treat as a tablet resolution.', 'themesflat' ),
            'type'        => Controls_Manager::NUMBER,
            'default'     => 800,
        ] );
        $this->add_control( 'heading_mobile', [
            'label'     => __( 'Mobile Phone', 'themesflat' ),
            'type'      => Controls_Manager::HEADING,
            'separator' => 'after',
        ] );
        $this->add_control( 'mobile_display_columns', [
            'label'   => __( 'Columns per row', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'min'     => 1,
            'max'     => 3,
            'step'    => 1,
            'default' => 1,
        ] );
        $this->add_control( 'mobile_scroll_columns', [
            'label'   => __( 'Columns to scroll', 'themesflat' ),
            'type'    => Controls_Manager::NUMBER,
            'min'     => 1,
            'max'     => 3,
            'step'    => 1,
            'default' => 1,
        ] );
        $this->add_control( 'mobile_width', [
            'label'       => __( 'Mobile Resolution', 'themesflat' ),
            'description' => __( 'The resolution to treat as a mobile resolution.', 'themesflat' ),
            'type'        => Controls_Manager::NUMBER,
            'default'     => 480,
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_slider_item_taxonomy_terms', [
            'label' => __( 'Post Taxonomy Terms', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_STYLE,
        ] );
        $this->add_control( 'taxonomy_terms_color', [
            'label'     => __( 'Taxonomy Terms Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-terms, {{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-terms a' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'taxonomy_terms_hover_color', [
            'label'     => __( 'Taxonomy Terms Hover Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-terms a:hover' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [
            'name'     => 'taxonomy_terms_typography',
            'selector' => '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-terms, {{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-terms a',
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_entry_title_styling', [
            'label' => __( 'Post Entry Title', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_STYLE,
        ] );
        $this->add_control( 'entry_title_tag', [
            'label'   => __( 'Entry Title HTML Tag', 'themesflat' ),
            'type'    => Controls_Manager::SELECT,
            'options' => [
            'h1'  => __( 'H1', 'themesflat' ),
            'h2'  => __( 'H2', 'themesflat' ),
            'h3'  => __( 'H3', 'themesflat' ),
            'h4'  => __( 'H4', 'themesflat' ),
            'h5'  => __( 'H5', 'themesflat' ),
            'h6'  => __( 'H6', 'themesflat' ),
            'div' => __( 'div', 'themesflat' ),
        ],
            'default' => 'h3',
        ] );
        $this->add_control( 'entry_title_color', [
            'label'     => __( 'Entry Title Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-title a' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'entry_title_hover_color', [
            'label'     => __( 'Entry Title Hover Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-title a:hover' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [
            'name'     => 'entry_title_typography',
            'selector' => '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-title a',
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_entry_meta_styling', [
            'label' => __( 'Post Entry Meta', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_STYLE,
        ] );
        $this->add_control( 'entry_meta_color', [
            'label'     => __( 'Entry Meta Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-meta span' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'entry_meta_link_color', [
            'label'     => __( 'Entry Meta Link Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-meta span a' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'entry_meta_link_hover_color', [
            'label'     => __( 'Entry Meta Link Hover Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-meta span a:hover' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [
            'name'     => 'entry_meta_typography',
            'selector' => '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-meta span, {{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-meta span a',
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_entry_summary_styling', [
            'label' => __( 'Post Entry Summary', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_STYLE,
        ] );
        $this->add_control( 'entry_summary_color', [
            'label'     => __( 'Entry Summary Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-summary' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [
            'name'     => 'entry_summary_typography',
            'selector' => '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-post-summary',
        ] );
        $this->end_controls_section();
        $this->start_controls_section( 'section_read_more_styling', [
            'label' => __( 'Read More', 'themesflat' ),
            'tab'   => Controls_Manager::TAB_STYLE,
        ] );
        $this->add_control( 'read_more_color', [
            'label'     => __( 'Read More Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-read-more' => 'background-color: {{VALUE}}; border-color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'read_more_hover_color', [
            'label'     => __( 'Read More Hover Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-read-more:hover' => 'background-color: {{VALUE}}; border-color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'read_more_text_color', [
            'label'     => __( 'Read More Text Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-read-more' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_control( 'read_more_hover_text_color', [
            'label'     => __( 'Read More Hover Text Color', 'themesflat' ),
            'type'      => Controls_Manager::COLOR,
            'selectors' => [
            '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-read-more:hover' => 'color: {{VALUE}};',
        ],
        ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [
            'name'     => 'read_more_typography',
            'selector' => '{{WRAPPER}} .tfl-posts-multislider .tfl-posts-multislider-item .tfl-post-text .tfl-read-more',
        ] );
        $this->end_controls_section();
    }
    
    protected function render()
    {
        $settings = $this->get_settings_for_display();
        $settings['slider_id'] = $this->get_id();
        $settings = apply_filters( 'tfl_posts_multislider_' . $this->get_id() . '_settings', $settings );
        $args['settings'] = $settings;
        tfl_get_template_part( 'addons/posts-multislider/loop', $args );
    }
    
    protected function content_template()
    {
    }

}