<?php
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
use Elementor\Scheme_Color;
use Elementor\Group_Control_Typography;
Use Elementor\Core\Schemes\Typography;
use Elementor\Group_Control_Border;
use Elementor\Utils;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Controls_Stack;


if (!defined('ABSPATH')) exit; 

class Widgetkit_Pro_LP_Course_List extends Widget_Base
{

    public function get_name()
    {
        return 'widgetkit-pro-lp-course-list';
    }

    public function get_title()
    {
        return __('LearnPress Course List', 'widgetkit-pro');
    }

    public function get_icon()
    {
        return 'eicon-post-content';
    }

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

    /**
	 * A list of style that the widgets is depended in
	 **/
	public function get_style_depends() {
        return [
            'widgetkit_pro_base',
            'widgetkit_pro_default',
            'uikit',
        ];
    }
	/**
	 * A list of scripts that the widgets is depended in
	 **/
	public function get_script_depends() {
		return [ 
			'magnific-js',
            'layout',
            'uikit-js',
			'uikit-icons',
        ];
	}

    protected function register_controls()
    {


#   region query
    $this->start_controls_section(
        'section_query',
        [
            'label' => __( 'Query', 'widgetkit-pro' ),
        ]
    );
        $this->add_control(
            'posts_per_page',
            [
                'label' => __('Course to Show', 'widgetkit-pro'),
                'type' => Controls_Manager::NUMBER,
                'default' => 6,
                'min' => 1,
                'max' => 50,
                'step' => 1,
            ]
        );
    $this->end_controls_section();
#   endregion

#   region layout        
        /**
         * Layout
         */
        $this->start_controls_section(
			'section_layout',
			[
				'label' => __( 'Layout', 'widgetkit-pro' ),
			]
        );
            $this->add_control(
                'lp_course_style',
                [
                    'label'     => esc_html__( 'Skin', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::SELECT,
                    'default'   => 'style_1',
                    'options'   => [
                        'style_1'   => esc_html__( 'Screen 1', 'widgetkit-pro' ),
                        'style_2'   => esc_html__( 'Screen 2', 'widgetkit-pro' ),
                    ],

                ]
            );
            $this->add_control(
                'lp_course_layout',
                [
                    'label'     => esc_html__( 'Layout', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::SELECT,
                    'default'   => 'layout_grid',
                    'options'   => [
                        'layout_grid'   => esc_html__( 'Grid', 'widgetkit-pro' ),
                        'layout_slider'   => esc_html__( 'Slider', 'widgetkit-pro' ),
                    ],

                ]
            );
            $this->add_control(
                'posts_column',
                [
                    'label' => __('Column', 'widgetkit-pro'),
                    'type' => Controls_Manager::SELECT,
                    'default' => '3',
                    'options' => [
                        '6' => __('6 Column', 'widgetkit-pro'),
                        '4' => __('4 Column', 'widgetkit-pro'),
                        '3' => __('3 Column', 'widgetkit-pro'),
                        '2' => __('2 Column', 'widgetkit-pro'),
                        '1' => __('1 Column', 'widgetkit-pro'),
                    ],
                ]
            );
            $this->add_control(
                'product_layout_slider_grid_gap',
                [
                    'label'       => __( 'Grid Gap', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => 'wk-grid-medium',
                    'options' => [
                        'wk-grid-small'  => __( 'Small', 'widgetkit-pro' ),
                        'wk-grid-medium'  => __( 'Medium', 'widgetkit-pro' ),
                        'wk-grid-large'  => __( 'Large', 'widgetkit-pro' ),
                        'wk-grid-collapse'  => __( 'collapse', 'widgetkit-pro' ),
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion 

#   region title & description        
        $this->start_controls_section(
			'section_title_description',
			[
				'label' => __( 'Title & Description', 'widgetkit-pro' ),
			]
        );
            $this->add_control(
                'show_course_description',
                [
                    'label' => __( 'Description', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => 'yes',
                    'label_on' => __( 'Show', 'widgetkit-pro' ),
                    'label_off' => __( 'Hide', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'excerpt_desc_word',
                [
                    'label' => __('Word Count', 'widgetkit-pro'),
                    'type' => Controls_Manager::NUMBER,
                    'default' => 15,
                    'min' => 5,
                    'max' => 150,
                    'step' => 1,
                    'condition' => [
                        'show_course_description' => 'yes',
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion

#   region Meta
        $this->start_controls_section(
			'section_meta',
			[
				'label' => __( 'Meta', 'widgetkit-pro' ),
			]
        );
        $this->add_control(
            'lp_course_price',
            [
                'label' => __( 'Price', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => 'yes',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'lp_course_cat',
            [
                'label' => __( 'Categories', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => 'yes',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'lp_course_students_er',
            [
                'label' => __( 'Enrolle Count', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => 'yes',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'show_hide_lp_instructor',
            [
                'label' => __( 'Instructor', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => 'yes',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'lp_course_duration',
            [
                'label' => __( 'Duration', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => 'yes',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
                'condition' => [
                    'lp_course_style' => 'style_2'
                ]
            ]
        );
        $this->add_control(
            'lp_course_rating',
            [
                'label' => __( 'Rating', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => 'yes',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
                // 'condition' => [
                //     'lp_course_style' => 'style_2'
                // ]
            ]
        );
        $this->end_controls_section();
#   endregion        

#   region Slider Control
        $this->start_controls_section(
			'section_slider_options',
			[
                'label' => __( 'Slider Control', 'widgetkit-pro' ),
                'condition' => [
                    'lp_course_layout' => 'layout_slider'
                ]
			]
        );
            $this->add_control(
                'section_title_navigation_arrow',
                [
                'label' => __( 'Navigation Arrow', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                ]
            );
            $this->add_control(
                'slider_navigation_arrow_position',
                [
                    'label'       => __( 'Arrow', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SELECT,
                    'default' => 'inside',
                    'options' => [
                        'inside'  => __( 'Inside', 'widgetkit-pro' ),
                        'outside'  => __( 'Outside', 'widgetkit-pro' ),
                    ],
                ]
            );
            $this->add_control(
                'nav_arrow_view_on_hover',
                [
                    'label' => __( 'View on Hover', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Show', 'widgetkit-pro' ),
                    'label_off' => __( 'Hide', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                    'condition' => [
                        'slider_navigation_arrow_position' => 'inside'
                    ]
                ]
            );
            /**
             * navigation dot
             */
            $this->add_control(
                'section_title_navigation_dots',
                [
                'label' => __( 'Navigation Dots', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before',
                ]
            );
            
            $this->add_control(
                'nav_dot_view',
                [
                    'label' => __( 'Display', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Show', 'widgetkit-pro' ),
                    'label_off' => __( 'Hide', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'section_title_navigation_other',
                [
                'label' => __( 'Others', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before'
                ]
            );
            $this->add_control(
                'slider_auto_play',
                [
                    'label' => __( 'Auto Play', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Show', 'widgetkit-pro' ),
                    'label_off' => __( 'Hide', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'slider_auto_play_interval',
                [
                    'label' => __( 'Autoplay Interval', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SLIDER,
                    'default' => [
                        'size' => 4000,
                    ],
                    'range' => [
                        'px' => [
                            'min' => 100,
                            'max' => 10000,
                            'step' => 100,
                        ],
                    ],
                    'size_units' => [  ],
                    'condition' => [
                        'slider_auto_play' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'slider_pause_on_hover',
                [
                    'label' => __( 'Pause on Hover', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                    'condition' => [
                        'slider_auto_play' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'slider_slides_on_set',
                [
                    'label' => __( 'Slides on Set', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'slider_slides_loop',
                [
                    'label' => __( 'loop', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
        $this->end_controls_section();
#   endregion 





#   region title & description style
        /**
         * Title and description style
         */
        $this->start_controls_section(
            'section_style_title',
            [
                'label' => __( 'Title & Description', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
            ]
        );
            $this->add_control(
                'style_title',
                [
                'label' => __( 'Title', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                ]
            );
            $this->add_group_control(
                Group_Control_Typography::get_type(),
                [
                    'name' => 'edumodo_title_typography',
                    'selector' => '{{WRAPPER}} .edumodo-lp-course-1 .lp-course-1 .course-content-body .course-entry-title a, .edumodo-course-1 article.tx-course .course-details .entry-header .course-entry-title',
                ]
            );
            $this->start_controls_tabs('section_content_color_tabs');
                /**
                 * Normal Tab
                 */
                $this->start_controls_tab(
                    'section_content_style_normal',
                    [
                        'label' => __( 'Normal', 'widgetkit-pro' ),
                    ]
                );
                    $this->add_control(
                        'title_color',
                        [
                            'label'     => __( 'Color', 'widgetkit-pro' ),
                            'type'      => Controls_Manager::COLOR,
                            'default'   => '#333',
                            'selectors' => [
                                '{{WRAPPER}} .edumodo-lp-course-1 .lp-course-1 .course-content-body .course-entry-title a, .edumodo-course-1 article.tx-course .course-details .entry-header .course-entry-title a' => 'color: {{VALUE}};',
                            ],
                        ]
                    );
                $this->end_controls_tab();
                /**
                 * Hover style
                 */
                $this->start_controls_tab(
                    'section_content_style_hover',
                    [
                        'label' => __( 'Hover', 'widgetkit-pro' ),
                    ]
                );
                    $this->add_control(
                        'title_color_hover',
                        [
                            'label'     => __( 'Color', 'widgetkit-pro' ),
                            'type'      => Controls_Manager::COLOR,
                            'default'   => '#333',
                            'selectors' => [
                                '{{WRAPPER}} .edumodo-lp-course-1 .lp-course-1 .course-content-body .course-entry-title a:hover' => 'color: {{VALUE}};',
                            ],
                        ]
                    );
                $this->end_controls_tab();
            $this->end_controls_tabs();
            $this->add_responsive_control(
                'title_spacing_bottom',
                [
                    'label' => __( 'Spacing Bottom', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SLIDER,
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list-wrapper .course-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
            
            $this->add_control(
                'style_description',
                [
                    'label' => __( 'Description', 'widgetkit-pro' ),
                    'type' => Controls_Manager::HEADING,
                    'separator' => 'before',
                ]
            );
            $this->add_control(
                'desc_color',
                [
                    'label'     => __( 'Color', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::COLOR,
                    'default'   => '',
                    'selectors' => [
                        '{{WRAPPER}} .edumodo-lp-course-1 .lp-course-1 .course-content-body .wkp-entry-content, .edumodo-course-1 article.tx-course .course-details .wkp-entry-content p' => 'color: {{VALUE}};',
                    ],
                ]
            );
            $this->add_group_control(
                Group_Control_Typography::get_type(),
                [
                    'name' => 'desc_typography',
                    'selector' => '{{WRAPPER}} .edumodo-lp-course-1 .lp-course-1 .wkp-entry-content  p, .edumodo-course-1 article.tx-course .course-details .wkp-entry-content p',
                ]
            );
            $this->add_responsive_control(
                'desc_spacing_top',
                [
                    'label' => __( 'Spacing Top', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SLIDER,
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list-wrapper .wkp-entry-content' => 'margin-top: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
            
        $this->end_controls_section();
#   endregion        

#   region image for screen 1  style      
        /**
         * Image
         */
        $this->start_controls_section(
            'section_style_image',
            [
                'label' => __( 'Image', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
            ]
        );
            $this->add_control(
                'lp_course_image_overlay',
                [
                    'label' => __( 'Image Overlay', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Yes', 'widgetkit-pro' ),
                    'label_off' => __( 'No', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'lp_course_image_overlay_background',
                [
                    'label'     => __( 'Overlay', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::COLOR,
                    'default'   => 'rgba(36, 44, 94, 0.8)',
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon' => 'background-color: {{VALUE}};',
                    ],
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'style_overlay_icon',
                [
                    'label' => __( 'Icon', 'widgetkit-pro' ),
                    'type' => Controls_Manager::HEADING,
                    'separator' => 'before',
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'style_overlay_icon_picker',
                [
                    'label' => esc_html__( 'Choose your icon', 'widgetkit-for-elementor' ),
                    'type'              => Controls_Manager::ICONS,
                    'fa4compatibility'  => '',
                    'default'    =>  [
                        'value'     => 'fas fa-book',
                        'library'   => 'fa-solid',
                    ],
                    'label_block'   => true,
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_course_image_overlay_icon_color',
                [
                    'label'     => __( 'Color', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::COLOR,
                    'default'   => '#242c5e',
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon i' => 'color: {{VALUE}};',
                    ],
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_course_image_overlay_icon_background',
                [
                    'label'     => __( 'Background', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::COLOR,
                    'default'   => '#fff',
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon i' => 'background: {{VALUE}};',
                    ],
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_course_image_overlay_icon_size',
                [
                    'label'   => esc_html__( 'Icon Size', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>14,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
                    ],
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_course_image_overlay_icon_box_wh_size',
                [
                    'label'   => esc_html__( 'Box Size', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>35,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon i.custom-overlay-icon' => 'width: {{SIZE}}{{UNIT}};',
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon i' => 'height: {{SIZE}}{{UNIT}};',
                    ],
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );

            $this->add_control(
                'lp_course_image_overlay_icon_box_border_radius',
                [
                    'label'   => esc_html__( 'Border Radius', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>50,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list .column span.overlay-icon i' => 'border-radius: {{SIZE}}{{UNIT}};',
                    ],
                    'condition' => [
                        'lp_course_image_overlay' => 'yes'
                    ]
                ]
            );
        
        $this->end_controls_section();

#   endregion

#   region meta for screen 1 style       
        /**
         * Meta
         */
        $this->start_controls_section(
            'section_style_price',
            [
                'label' => __( 'Meta', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_style' => 'style_1'
                ]
            ]
        );
        $this->add_control(
            'style_price',
            [
                'label' => __( 'Price', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before',
            ]
        );
        $this->add_control(
            'price_color',
            [
                'label'     => __( 'Color', 'widgetkit-pro' ),
                'type'      => Controls_Manager::COLOR,
                'default'   => '',
                'selectors' => [
                    '{{WRAPPER}} .edumodo-lp-course-1 span.addon-price' => 'color: {{VALUE}};',
                ]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'edumodo_meta_price_typography',
                'selector' => '{{WRAPPER}} .edumodo-course-1 article.tx-course span.addon-price, .edumodo-lp-course-1 span.addon-price',
            ]
        );
        $this->add_control(
            'style_enroll',
            [
                'label' => __( 'Enroll Count', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before',
            ]
        );
        $this->add_control(
            'enroll_color',
            [
                'label'     => __( 'Color', 'widgetkit-pro' ),
                'type'      => Controls_Manager::COLOR,
                'default'   => '',
                'selectors' => [
                    '{{WRAPPER}} .edumodo-course-1 article.tx-course .course-details .course-meta .post-view i, .type-tx-course article.tx-course .course-details .course-meta .post-view i' => 'color: {{VALUE}};',
                    '{{WRAPPER}} .edumodo-course-1 article.tx-course .course-details .course-meta .post-view, .type-tx-course article.tx-course .course-details .course-meta .post-view' => 'color: {{VALUE}};',

                    '{{WRAPPER}} .edumodo-lp-course-1 .course-meta.addons-course-meta span.post-view' => 'color: {{VALUE}};',
                ]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'edumodo_meta_enroll_typography',
                'selector' => '{{WRAPPER}} .edumodo-lp-course-1 .course-meta span.post-view',
            ]
        );
        
        $this->end_controls_section();

#   endregion

#   region author for screen 2 style 
        $this->start_controls_section(
            'section_style_course_author',
            [
                'label' => __( 'Author', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_style' => 'style_2'
                ]
            ]
        );
            $this->add_control(
                'lp_author_color',
                [
                    'label' => __( 'Color', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} .author-wrapper .course-author-name' => 'color: {{VALUE}}',
                    ],
                ]
            );
            $this->add_group_control(
                Group_Control_Typography::get_type(),
                [
                    'name' => 'lp_course_author_typography',
                    'selector' => '{{WRAPPER}} .author-wrapper .course-author-name',
                ]
            );
            $this->add_control(
                'lp_course_author_image_border_radius',
                [
                    'label'   => esc_html__( 'Image Border Radius', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>50,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .learnpress-course-list-style-2 .author-wrapper img' => 'border-radius: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
            $this->add_responsive_control(
                'lp_author_margin',
                [
                    'label'         => __('Margin', 'widgetkit-pro'),
                    'type'          => Controls_Manager::DIMENSIONS,
                    'size_units'    => ['px','%'],
                    
                    'selectors'     => [
                        '{{WRAPPER}} .learnpress-course-list-style-2 .author-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion   

#   region rating style
    $this->start_controls_section(
        'section_style_course_rating',
        [
            'label' => __( 'Rating', 'widgetkit-pro' ),
            'tab'   => Controls_Manager::TAB_STYLE,
        ]
    );
        $this->add_control(
            'lp_rating_blank_star_color',
            [
                'label' => __( 'Blank Star', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .column article .rating .star-rating:before' => 'color: {{VALUE}}',
                ],
            ]
        );
        $this->add_control(
            'lp_rating_star_color',
            [
                'label' => __( 'Star', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .column article .rating .star-rating span:before' => 'color: {{VALUE}}',
                ],
            ]
        );
        $this->add_control(
            'lp_rating_text_color',
            [
                'label' => __( 'Text Color', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .column article .rating .lp-course-rate li' => 'color: {{VALUE}}',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'lp_course_rating_typography',
                'selector' => '{{WRAPPER}} .column article .rating .lp-course-rate li',
            ]
        );
        $this->add_responsive_control(
            'lp_rating_margin',
            [
                'label'         => __('Margin', 'widgetkit-pro'),
                'type'          => Controls_Manager::DIMENSIONS,
                'size_units'    => ['px','%'],
                
                'selectors'     => [
                    '{{WRAPPER}} .column article .rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                ],
                'condition' => [
                    'lp_course_style' => 'style_1'
                ]
            ]
        );
    $this->end_controls_section();
#   endregion  

#   region category for screen 2 style      
        $this->start_controls_section(
            'section_style_course_category',
            [
                'label' => __( 'Category', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                // 'condition' => [
                //     'lp_course_style' => 'style_2'
                // ]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'lp_cat_typography',
                'selector' => '{{WRAPPER}} .edumodo-course-1 article.tx-course .course-details .course-meta .post-date a, .edumodo-lp-course-1 .lp-cat .cat-links a, {{WRAPPER}} .course-cat ul li a, {{WRAPPER}} .lp-cat .cat-links a',
            ]
        );
        
            $this->start_controls_tabs('lp_cat_style');
                /**
                 * Normal
                 */
                $this->start_controls_tab(
                    'lp_cat_style_normal',
                    [
                        'label' => __( 'Normal', 'widgetkit-pro' ),
                    ]
                );
                $this->add_control(
                    'lp_cat_color',
                    [
                        'label' => __( 'Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#fff',
                        'selectors' => [
                            '{{WRAPPER}} .course-cat ul li a' => 'color: {{VALUE}}',
                            '{{WRAPPER}} .lp-cat .cat-links a' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'lp_cat_bg_color',
                    [
                        'label' => __( 'Background', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#EEB90E',
                        'selectors' => [
                            '{{WRAPPER}} .course-cat ul li' => 'background: {{VALUE}}',
                            '{{WRAPPER}} .lp-cat .cat-links a' => 'background: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'lp_cat_hr',
                    [
                        'type' => \Elementor\Controls_Manager::DIVIDER,
                    ]
                );
                $this->add_group_control(
                    Group_Control_Border::get_type(), 
                    [
                        'name'          => 'lp_cat_border',
                        'selector'      => '{{WRAPPER}} .course-cat ul li, {{WRAPPER}} .lp-cat .cat-links a',
                    ]
                );
                $this->add_control(
                    'lp_cat_border_radius',
                    [
                        'label'   => esc_html__( 'Border Radius', 'widgetkit-for-elementor' ),
                        'type'    => Controls_Manager::SLIDER,
                        'default' => [
                            'size' =>2,
                        ],
                        'range'  => [
                            'px' => [
                                'min' => 0,
                                'max' => 100,
                            ],
                        ],
                        'selectors' => [
                            '{{WRAPPER}} .course-cat ul li' => 'border-radius: {{SIZE}}{{UNIT}};',
                            '{{WRAPPER}} .lp-cat .cat-links a' => 'border-radius: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->end_controls_tab();
                /**
                 * hover
                 */
                $this->start_controls_tab(
                    'lp_cat_style_hover',
                    [
                        'label' => __( 'Hover', 'widgetkit-pro' ),
                    ]
                );
                $this->add_control(
                    'lp_cat_color_hover',
                    [
                        'label' => __( 'Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#7c7000',
                        'selectors' => [
                            '{{WRAPPER}} .course-cat ul li:hover a' => 'color: {{VALUE}}',
                            '{{WRAPPER}} .lp-cat .cat-links a:hover' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'lp_cat_bg_color_hover',
                    [
                        'label' => __( 'Background', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#fff',
                        'selectors' => [
                            '{{WRAPPER}} .course-cat ul li:hover' => 'background: {{VALUE}}',
                            '{{WRAPPER}} .lp-cat .cat-links a:hover' => 'background: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'lp_cat_border_color_hover',
                    [
                        'label' => __( 'Border', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .course-cat ul li:hover' => 'border-color: {{VALUE}}',
                            '{{WRAPPER}} .lp-cat .cat-links a:hover' => 'border-color: {{VALUE}}',
                        ],
                    ]
                );
                $this->end_controls_tab();
            $this->end_controls_tabs();

            $this->add_responsive_control(
                'lp_cat_padding',
                [
                    'label'         => __('Padding', 'widgetkit-pro'),
                    'type'          => Controls_Manager::DIMENSIONS,
                    'size_units'    => ['px','%'],
                    'separator'     => 'before',
                    'selectors'     => [
                        '{{WRAPPER}} .course-cat ul li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                        '{{WRAPPER}} .lp-cat .cat-links a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                    ],
                ]
            );
            $this->add_responsive_control(
                'lp_cat_margin',
                [
                    'label'         => __('Margin', 'widgetkit-pro'),
                    'type'          => Controls_Manager::DIMENSIONS,
                    'size_units'    => ['px','%'],
                    
                    'selectors'     => [
                        '{{WRAPPER}} .course-cat ul li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                        '{{WRAPPER}} .lp-cat .cat-links a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion    

#   region enroll user for screen 2 style 
        $this->start_controls_section(
            'section_style_course_enroll',
            [
                'label' => __( 'Enroll', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_style' => 'style_2'
                ]
            ]
        );
            $this->add_control(
                'enroll_color_style_2',
                [
                    'label'     => __( 'Color', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::COLOR,
                    'default'   => '',
                    'selectors' => [
                        '{{WRAPPER}} .edumodo-course-1 article.tx-course .course-details .course-meta .post-view i, .type-tx-course article.tx-course .course-details .course-meta .post-view i' => 'color: {{VALUE}};',
                        '{{WRAPPER}} .edumodo-course-1 article.tx-course .course-details .course-meta .post-view, .type-tx-course article.tx-course .course-details .course-meta .post-view' => 'color: {{VALUE}};',

                        '{{WRAPPER}} .edumodo-lp-course-1 .course-meta.addons-course-meta span.post-view' => 'color: {{VALUE}};',
                        '{{WRAPPER}} .course-meta .course-user' => 'color: {{VALUE}};',
                    ]
                ]
            );
            $this->add_group_control(
                Group_Control_Typography::get_type(),
                [
                    'name' => 'lp_enroll_typography',
                    'selector' => '{{WRAPPER}} .edumodo-lp-course-1 .course-meta span.post-view, {{WRAPPER}} .course-meta .course-user',
                ]
            );
            $this->add_control(
                'enroll_icon_color',
                [
                    'label'     => __( 'Icon Color', 'widgetkit-pro' ),
                    'type'      => Controls_Manager::COLOR,
                    'default'   => '',
                    'selectors' => [
                        '{{WRAPPER}} .course-meta .enroll-student .meta-icon i' => 'color: {{VALUE}};',
                        '{{WRAPPER}} .course-meta .enroll-student .meta-icon svg' => 'fill: {{VALUE}};',
                    ]
                ]
            );
            $this->add_control(
                'lp_enroll_add_custom_icon',
                [
                    'label' => __( 'Custom Icon', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => '',
                    'label_on' => __( 'Show', 'widgetkit-pro' ),
                    'label_off' => __( 'Hide', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'lp_enroll_icon',
                [
                    'label' => esc_html__( 'Icon', 'widgetkit-for-elementor' ),
                    'type'              => Controls_Manager::ICONS,
                    'default'    =>  [
                        'value'     => 'fa fa-eye',
                        'library'   => 'fa-solid',
                    ],
                    'label_block'   => true,
                    'condition' => [
                        'lp_enroll_add_custom_icon' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_enroll_icon_width',
                [
                    'label'   => esc_html__( 'Icon Size', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 200,
                        ],
                    ],
                    'separator'     => 'before',
                    'selectors' => [
                        '{{WRAPPER}} .course-meta .enroll-student .meta-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
                        '{{WRAPPER}} .course-meta .enroll-student .meta-icon svg' => 'width: {{SIZE}}{{UNIT}};',
                    ],
                    'condition' => [
                        'lp_enroll_add_custom_icon' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_enroll_icon_spacing_right',
                [
                    'label'   => esc_html__( 'Icon Spacing', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 200,
                        ],
                    ],
                    'separator'     => 'before',
                    'selectors' => [
                        '{{WRAPPER}} .course-meta .enroll-student .meta-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
                        '{{WRAPPER}} .course-meta .enroll-student .meta-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion  

#   region course duration  for screen 2 style  
        $this->start_controls_section(
            'section_style_course_duration',
            [
                'label' => __( 'Duration', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_style' => 'style_2'
                ]
            ]
        );
        $this->add_control(
            'lp_duration_color',
            [
                'label'     => __( 'Color', 'widgetkit-pro' ),
                'type'      => Controls_Manager::COLOR,
                'default'   => '',
                'selectors' => [
                    '{{WRAPPER}} .course-meta .duraton .course-duration' => 'color: {{VALUE}};',
                ]
            ]
        );
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'lp_duration_typography',
                'selector' => '{{WRAPPER}} .course-meta .duraton .course-duration',
            ]
        );
        $this->add_control(
            'duration_icon_color',
            [
                'label'     => __( 'Icon Color', 'widgetkit-pro' ),
                'type'      => Controls_Manager::COLOR,
                'default'   => '',
                'selectors' => [
                    '{{WRAPPER}} .course-meta .duraton .meta-icon i' => 'color: {{VALUE}};',
                    '{{WRAPPER}} .course-meta .duraton .meta-icon svg' => 'fill: {{VALUE}};',
                ]
            ]
        );
        $this->add_control(
            'lp_duration_custom_icon',
            [
                'label' => __( 'Custom Icon', 'widgetkit-pro' ),
                'type' => Controls_Manager::SWITCHER,
                'default' => '',
                'label_on' => __( 'Show', 'widgetkit-pro' ),
                'label_off' => __( 'Hide', 'widgetkit-pro' ),
                'return_value' => 'yes',
            ]
        );
        $this->add_control(
            'lp_duration_icon',
            [
                'label' => esc_html__( 'Icon', 'widgetkit-for-elementor' ),
                'type'              => Controls_Manager::ICONS,
                'default'    =>  [
                    'value'     => 'fa fa-eye',
                    'library'   => 'fa-solid',
                ],
                'label_block'   => true,
                'condition' => [
                    'lp_duration_custom_icon' => 'yes'
                ]
            ]
        );
            $this->add_control(
                'lp_duration_icon_width',
                [
                    'label'   => esc_html__( 'Icon Size', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 200,
                        ],
                    ],
                    'separator'     => 'before',
                    'selectors' => [
                        '{{WRAPPER}} .course-meta .duraton .meta-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
                        '{{WRAPPER}} .course-meta .duraton .meta-icon svg' => 'width: {{SIZE}}{{UNIT}};',
                    ],
                    'condition' => [
                        'lp_duration_custom_icon' => 'yes'
                    ]
                ]
            );
            $this->add_control(
                'lp_duration_icon_spacing_right',
                [
                    'label'   => esc_html__( 'Icon Spacing', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 200,
                        ],
                    ],
                    'separator'     => 'before',
                    'selectors' => [
                        '{{WRAPPER}} .course-meta .duraton .meta-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
                        '{{WRAPPER}} .course-meta .duraton .meta-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion   

#   region price for screen 2 style       

        $this->start_controls_section(
            'section_style_course_price',
            [
                'label' => __( 'Price', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_style' => 'style_2'
                ]
            ]
        );
        
        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name' => 'lp_price_typography',
                'selector' => '{{WRAPPER}} .edumodo-course-1 article.tx-course span.addon-price, .edumodo-lp-course-1 span.addon-price, {{WRAPPER}} .course-meta .course-price',
            ]
        );
        
        
            $this->start_controls_tabs('lp_price_style');
                /**
                 * Normal
                 */
                $this->start_controls_tab(
                    'lp_price_style_normal',
                    [
                        'label' => __( 'Normal', 'widgetkit-pro' ),
                    ]
                );
                $this->add_control(
                    'content_lp_price_color',
                    [
                        'label' => __( 'Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#fff',
                        'selectors' => [
                            '{{WRAPPER}} .course-meta .course-price' => 'color: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'content_lp_price_bg_color',
                    [
                        'label' => __( 'Background', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#EEB90E',
                        'selectors' => [
                            '{{WRAPPER}} .course-meta .course-price' => 'background: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'lp_price_hr',
                    [
                        'type' => \Elementor\Controls_Manager::DIVIDER,
                    ]
                );
                $this->add_group_control(
                    Group_Control_Border::get_type(), 
                    [
                        'name'          => 'lp_price_border',
                        'selector'      => '{{WRAPPER}} .course-meta .course-price',
                    ]
                );
                $this->add_control(
                    'lp_price_border_radius',
                    [
                        'label'   => esc_html__( 'Border Radius', 'widgetkit-for-elementor' ),
                        'type'    => Controls_Manager::SLIDER,
                        'default' => [
                            'size' =>2,
                        ],
                        'range'  => [
                            'px' => [
                                'min' => 0,
                                'max' => 100,
                            ],
                        ],
                        'selectors' => [
                            '{{WRAPPER}} .course-meta .course-price' => 'border-radius: {{SIZE}}{{UNIT}};',
                        ],
                    ]
                );
                $this->end_controls_tab();
                /**
                 * hover
                 */
                $this->start_controls_tab(
                    'lp_price_style_hover',
                    [
                        'label' => __( 'Hover', 'widgetkit-pro' ),
                    ]
                );
                $this->add_control(
                    'content_lp_price_color_hover',
                    [
                        'label' => __( 'Color', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#7c7000',
                        'selectors' => [
                            '{{WRAPPER}} .course-meta .course-price:hover' => 'color: {{VALUE}} ',
                        ],
                    ]
                );
                $this->add_control(
                    'content_lp_price_bg_color_hover',
                    [
                        'label' => __( 'Background', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'default' => '#fff',
                        'selectors' => [
                            '{{WRAPPER}} .course-meta .course-price:hover' => 'background: {{VALUE}}',
                        ],
                    ]
                );
                $this->add_control(
                    'content_lp_price_border_color_hover',
                    [
                        'label' => __( 'Border', 'widgetkit-pro' ),
                        'type' => Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .course-meta .course-price:hover' => 'border-color: {{VALUE}}',
                        ],
                    ]
                );
                $this->end_controls_tab();
            $this->end_controls_tabs();
            $this->add_responsive_control(
                'lp_price_padding',
                [
                    'label'         => __('Padding', 'widgetkit-pro'),
                    'type'          => Controls_Manager::DIMENSIONS,
                    'size_units'    => ['px','%'],
                    'selectors'     => [
                        '{{WRAPPER}} .course-meta .course-price' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                    ],
                ]
            );
        $this->end_controls_section();
#   endregion

#   region meta user for screen 2 style      
        $this->start_controls_section(
            'section_style_course_meta',
            [
                'label' => __( 'Meta', 'widgetkit-pro' ),
                'tab'   => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_style' => 'style_2'
                ]
            ]
        );
        $this->add_group_control(
            Group_Control_Border::get_type(), 
            [
                'name'          => 'lp_course_meta_border',
                'selector'      => '{{WRAPPER}} .course-meta',
            ]
        );
        $this->add_control(
            'lp_meta__bg_color',
            [
                'label' => __( 'Background', 'widgetkit-pro' ),
                'type' => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .course-meta' => 'background: {{VALUE}}',
                ],
            ]
        );
        $this->add_responsive_control(
            'lp_course_meta_padding',
            [
                'label'         => __('Padding', 'widgetkit-pro'),
                'type'          => Controls_Manager::DIMENSIONS,
                'size_units'    => ['px','%'],
                'selectors'     => [
                    '{{WRAPPER}} .course-meta' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                ],
            ]
        );
        $this->add_responsive_control(
            'lp_course_meta_margin',
            [
                'label'         => __('Margin', 'widgetkit-pro'),
                'type'          => Controls_Manager::DIMENSIONS,
                'size_units'    => ['px','%'],
                'selectors'     => [
                    '{{WRAPPER}} .course-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
                ],
            ]
        );
        $this->end_controls_section();
#   endregion  

#   region Navigation style 
        /**
         * Navigation
         */
        $this->start_controls_section(
            'section_style_navigation',
            [
                'label' => __( 'Navigation', 'widgetkit-pro' ),
                'tab' => Controls_Manager::TAB_STYLE,
                'condition' => [
                    'lp_course_layout' => 'layout_slider'
                ]
            ]
        );
            $this->add_control(
                'section_heading_navigation_arrow',
                [
                'label' => __( 'Arrow', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                ]
            );
            
            $this->add_control(
                'navigation_arrow_width_height',
                [
                    'label'   => esc_html__( 'Size', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>35,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 10,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-slidenav' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
            $this->add_control(
                'navigation_arrow_font_size',
                [
                    'label'   => esc_html__( 'Font Size', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>12,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 10,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-slidenav svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
            $this->add_control(
                'navigation_arrow_color',
                [
                    'label' => __( 'Color', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'default' => '#eeb90e',
                    'separator' => 'before',
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-slidenav svg' => 'color: {{VALUE}}',
                        '{{WRAPPER}} .wk-slider .wk-slidenav:hover' => 'background: {{VALUE}}',
                    ],
                ]
            );
            $this->add_control(
                'navigation_arrow_background_color',
                [
                    'label' => __( 'Background', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'default' => '#fff',
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-slidenav' => 'background: {{VALUE}}',
                        '{{WRAPPER}} .wk-slider .wk-slidenav:hover svg' => 'color: {{VALUE}}',
                    ],
                ]
            );
            $this->add_control(
                'navigation_arrow_border_radius',
                [
                    'label'   => esc_html__( 'Border Radius', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>50,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-slidenav' => 'border-radius: {{SIZE}}{{UNIT}};',
                    ],
                    'separator' => 'before'
                ]
            );
            $this->add_group_control(
                Group_Control_Border::get_type(), 
                [
                    'name'          => 'navigation_arrow_border',
                    'label' => __( 'Border', 'widgetkit-pro' ),
                    'selector'      => '{{WRAPPER}} .wk-slider .wk-slidenav',
                ]
            );
            $this->add_control(
                'navigation_arrow_enable_box_shadow',
                [
                    'label' => __( 'Box Shadow', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SWITCHER,
                    'default' => 'yes',
                    'label_on' => __( 'Show', 'widgetkit-pro' ),
                    'label_off' => __( 'Hide', 'widgetkit-pro' ),
                    'return_value' => 'yes',
                ]
            );
            $this->add_control(
                'navigation_arrow_box-shadow',
                [
                    'label' => __( 'Box Shadow', 'widgetkit-pro' ),
                    'type' => Controls_Manager::BOX_SHADOW,
                    'default' => [
                        'color' => 'rgba(0,0,0,.08)',
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-slidenav' => 'box-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{SPREAD}}px {{COLOR}};',
                    ],
                    'condition' => [
                        'navigation_arrow_enable_box_shadow' => 'yes'
                    ]
                ]
            );
            
            /**
             * Dot
             */
            $this->add_control(
                'section_heading_navigation_dot',
                [
                'label' => __( 'Dot', 'widgetkit-pro' ),
                'type' => Controls_Manager::HEADING,
                'separator' => 'before',
                ]
            );
            $this->add_control(
                'navigation_dot_background_color',
                [
                    'label' => __( 'Background', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'default' => 'rgba(238,185,14,0.35)',
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-dotnav li a' => 'background: {{VALUE}}',
                    ],
                ]
            );
            $this->add_control(
                'navigation_dot_active_background_color',
                [
                    'label' => __( 'Active Background', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'default' => '#eeb90e',
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-dotnav li.wk-active a' => 'background: {{VALUE}}',
                    ],
                ]
            );
            $this->add_control(
                'navigation_dot_margin-top',
                [
                    'label'   => esc_html__( 'Spacing Top', 'widgetkit-for-elementor' ),
                    'type'    => Controls_Manager::SLIDER,
                    'default' => [
                        'size' =>20,
                    ],
                    'range'  => [
                        'px' => [
                            'min' => -50,
                            'max' => 200,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} .wk-slider .wk-dotnav' => 'margin-top: {{SIZE}}{{UNIT}} !important ;',
                    ],
                ]
            );
        $this->end_controls_section();

#   endregion

#   region single course style
        /**
         * Single Course
         */
        $this->start_controls_section(
            'section_wapper_style',
                [
                    'label' => __( 'Global Option', 'widgetkit-pro' ),
                    'tab' => Controls_Manager::TAB_STYLE,
                ]
            );
            $this->add_control(
                'layout_background_color',
                [
                    'label' => __( 'Background', 'widgetkit-pro' ),
                    'type' => Controls_Manager::COLOR,
                    'selectors' => [
                        '{{WRAPPER}} article.learnpress-single-course-card .course-content-body' => 'background-color: {{VALUE}};',
                    ],
                    'separator' => 'after',
                ]
            );
            $this->add_group_control(
                Group_Control_Border::get_type(), 
                [
                    'name'          => 'Border',
                    'selector'      => '{{WRAPPER}} article.learnpress-single-course-card',
                ]
            );
            $this->add_control(
                'layout_border_radius',
                [
                    'label' => __( 'Border Radius', 'widgetkit-pro' ),
                    'type' => Controls_Manager::SLIDER,
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 100,
                        ],
                    ],
                    'selectors' => [
                        '{{WRAPPER}} article.learnpress-single-course-card' => 'border-radius: {{SIZE}}{{UNIT}};',
                    ],
                ]
            );
            $this->add_group_control(
                Group_Control_Box_Shadow::get_type(),
                [
                    'name' => 'body_box_shadow',
                    'selector' => '{{WRAPPER}} article.learnpress-single-course-card',
                ]
            );
            $this->add_group_control(
                Group_Control_Box_Shadow::get_type(),
                [
                    'label' => __('Box Shadow Hover', 'widgetkit-pro'),
                    'name' => 'course_box_shadow_hover',
                    'selector' => '{{WRAPPER}} article.learnpress-single-course-card:hover',
                ]
            );
            $this->add_responsive_control(
                'style_course_padding',
                [
                    'label' => esc_html__( 'Padding', 'widgetkit-pro' ),
                    'type'  => Controls_Manager::DIMENSIONS,
                    'size_units' => [ 'px'],
                    'selectors'  => [
                        '{{WRAPPER}} article.learnpress-single-course-card .course-content-body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'separator' => 'before',
                    'default' => [
                        'top' => '20',
                        'right' => '20',
                        'bottom' => '20',
                        'left' => '20',
                        'unit' => 'px',
                        'isLinked' => false,
                    ],
                ]
            );
            $this->add_responsive_control(
                'style_course_margin',
                [
                    'label' => esc_html__( 'Margin', 'widgetkit-pro' ),
                    'type'  => Controls_Manager::DIMENSIONS,
                    'size_units' => [ 'px'],
                    'selectors'  => [
                        '{{WRAPPER}} article.learnpress-single-course-card' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'separator' => 'before',
                    'default' => [
                        'top' => '0',
                        'right' => '0',
                        'bottom' => '20',
                        'left' => '0',
                        'unit' => 'px',
                        'isLinked' => false,
                    ],
                ]
            );

        $this->end_controls_section();
#   endregion        

		
    }


    protected function render()
    {
        $settings = $this->get_settings();
        $lp_course_style = widgetkit_pro_array_get($settings, 'lp_course_style');
        ?>

        <div id="learnpress-course-list-<?php echo $this->get_id(); ?>" class="lp-course-list-element learnpress-course-list-<?php echo $this->get_id(); ?>">
            <?php 
            if($lp_course_style == 'style_1'):
                include( plugin_dir_path( __FILE__ ) . '../layout/learnpress/course-list.php'); 
            else:
                include( plugin_dir_path( __FILE__ ) . '../layout/learnpress/course-list-2.php'); 
            endif;
            ?>

        </div>

    <?php
    }

    protected function content_template()
    {
    }

}
