<?php

use Kubio\AssetsDependencyInjector;
function kubio_load_gutenberg_assets_pro()
{
	AssetsDependencyInjector::injectKubioScriptDependencies('swiper');
	AssetsDependencyInjector::injectKubioFrontendStyleDependencies('swiper');
	AssetsDependencyInjector::injectKubioScriptDependencies('typed');
}

add_action("kubio/editor/load_gutenberg_assets", 'kubio_load_gutenberg_assets_pro');

function kubio_register_kubio_scripts_scripts_dependencies_pro($scripts)
{
	$scripts = array_merge($scripts, array(
		array(
			'handle' => 'typed',
			'deps' => array('jquery'),
			'src' => 'typed.js',
		),
		array(
			'handle' => 'swiper',
			'deps' => array('jquery'),
			'src' => 'swiper/js/swiper.js',
		),
	));

	return $scripts;
}
add_filter("kubio/register_kubio_scripts_dependencies", "kubio_register_kubio_scripts_scripts_dependencies_pro");


function kubio_register_kubio_block_library_style_dependencies_pro($styles)
{
	$styles = array_merge($styles, array(
		array(
			'handle' => 'swiper',
			'src' => 'swiper/css/swiper.min.css',
		)
	));
	return $styles;
}
add_filter("kubio/register_block_library_style_dependencies", "kubio_register_kubio_block_library_style_dependencies_pro");
