<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_articles_categories
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
$colOwl = $params->get('num_col', 4);

?>
<div id="owl-categories-<?php echo $module->id ;?>" class="owl-categories">
	<div class="owl-carousel">
		<?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?>
	</div>
</div>


<script>
// Carousel - Articles Slide
jQuery(document).ready(function($) {
	$('#owl-categories-<?php echo $module->id ;?> .owl-carousel').owlCarousel({
    item: <?php echo $colOwl ;?>,
    loop: true,
    margin: 36,
    nav: false,
    navText: [
      '<span aria-label="' + 'Previous' + '" class= "fa fa-angle-left" aria-hidden="true"></span>',
      '<span aria-label="' + 'Next' + '" class= "fa fa-angle-right" aria-hidden="true"></span>'
    ],
    dots: false,
    responsive:{
      0:{
        items: 1
      },
      768:{
        items: 1
      },
      1200:{
        items: 2
      },
      1440:{
        items: <?php echo $colOwl ;?>
      }
    },
    lazyLoad: true
	})
});
</script>