<?php
/**
 * SiteOrigin template bridge for Logo Grid.
 *
 * @package Rsmspark_Content_Widgets
 */

defined( 'ABSPATH' ) || exit;

if ( class_exists( 'Rsmspark_Content_Widgets_Widget_Logo_Grid', false ) ) {
	Rsmspark_Content_Widgets_Widget_Logo_Grid::mark_so_rendered( array(), null );
}

$logo_vars = array(
	'title'         => $title ?? '',
	'title_color'   => $title_color ?? '',
	'title_size'    => $title_size ?? 0,
	'columns'       => $columns ?? '4',
	'layout'        => 'grid',
	'border_enable' => $border_enable ?? false,
	'border_width'  => $border_width ?? 1,
	'border_color'  => $border_color ?? '#e2e8f0',
	'border_radius'           => $border_radius ?? 'square',
	'container_border'        => $container_border ?? false,
	'container_border_width'  => $container_border_width ?? 1,
	'container_border_color'  => $container_border_color ?? '#e2e8f0',
	'container_border_radius' => $container_border_radius ?? 'square',
	'hover_overlay' => false,
	'grayscale'     => false,
	'items'         => $items ?? array(),
);

if ( ! isset( $style_vars ) ) {
	$logo_vars['style_vars'] = Rsmspark_Content_Widgets_Widget_Logo_Grid::section_style_vars( $logo_vars );
} else {
	$logo_vars['style_vars'] = $style_vars;
}

Rsmspark_Content_Widgets_Render::print_template(
	Rsmspark_Content_Widgets_Widget_Logo_Grid::REGISTRY_ID,
	'logo-grid.php',
	$logo_vars
);
