<?php
/**
 * @package DJ-Catalog2-Yootheme
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */
defined('_JEXEC') or die;
$el = $this->el('div', [

	'class' =>  $this->expr([
		'djc_rating',
		'uk-panel',
		'uk-{rating_text_style}' => ['rating_text_style' => $element['rating_text_style']],
		'uk-{rating_text_element} {@!rating_text_style}' => ['rating_text_element' => $element['rating_text_element'], 'rating_text_style' => $element['rating_text_style']],
		'uk-text-{rating_text_color}' => ['rating_text_color' => $element['rating_text_color']],
		'uk-font-{rating_text_font_family}' => ['rating_text_font_family' => $element['rating_text_font_family']],
		'uk-heading-{rating_text_decoration}' => ['rating_text_decoration' => $element['rating_text_decoration']],
		'uk-margin[-{rating_margin}]-top {@!rating_margin: remove}',
		'uk-margin-remove-top {@rating_margin: remove}',
		'uk-margin-remove-bottom',
		'uk-inline {@position_inline_rating}' => ['position_inline_rating' => $element['position_inline_rating']],
	], $element),
]);

//Style position && size of an element
$el->attr('style', [
	'position:{position_rating};' => ['position_rating' => $element['position_rating']],
	'left: {position_left_rating}px;' => ['position_left_rating' => $element['position_left_rating']],
	'right: {position_right_rating}px;' => ['position_right_rating' => $element['position_right_rating']],
	'top: {position_top_rating}px;' => ['position_top_rating' => $element['position_top_rating']],
	'bottom: {position_bottom_rating}px;' => ['position_bottom_rating' => $element['position_bottom_rating']],
	'z-index:{position_z_index_rating};' => ['position_z_index_rating' => $element['position_z_index_rating']],
	'width:{rating_width};' => ['rating_width' => $element['rating_width']],
	'height:{rating_height};' => ['rating_height' => $element['rating_height']],

], $element);

echo $el($props, $attrs, $props['rating']);
