"use strict";
(function ($) {
    $.block_recent_articles = function (element, options) {
        let defaults = {
            row_state_template: ""
        };
        let plugin = this;
        plugin.settings = {}
        let $element = $(element);
        plugin.init = function () {
            plugin.settings = $.extend({}, defaults, options);
            setTimeout(function () {
                $element.find('#owl-carousel').owlCarousel({
                    loop: true,
                    margin: 30,
                    autoplay:true,
                    responsive:{
                        0:{
                            items:1,
                            nav:false,
                            dots:true
                        },
                        576:{
                            items:2,
                            nav:false,
                            dots:true
                        },
                        768:{
                            items:2,
                            dots:true,
                            nav:false,
                        },
                        992:{
                            items:3,
                            dots:true,
                            nav:false,
                        }

                    }
                })
            }, 10);
        }
        plugin.example_function = function () {
        }
        plugin.init();
    }
    $.fn.block_recent_articles = function (options) {
        return this.each(function () {
            if (undefined === $(this).data('block_recent_articles')) {
                let plugin = new $.block_recent_articles(this, options);
                $(this).data('block_recent_articles'
                    , plugin);
            }
        });
    }
})(jQuery);
