<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

namespace StemBase\Modules\Shortcodes\Shortcode;

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}

use StemBase\Modules\Shortcodes\Shortcode\ShortcodeBase;

class Tooltip extends ShortcodeBase {

	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $name = "tooltip";
	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $version = "1.0";
	
	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $help = "";
	
	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $sample_usage = "";

	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $sample_attributes = array();

	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/
	function Render($data) {


		$this->loadTemplate();

		$vars	= $data["vars"];
		$css	= array();
		$style	= array();

		$info = array(
			"position"	=> $vars["position"] ? $vars["position"] : "top",
			"style"	=> implode(" " , $style),
			"title"	=> $vars["title"] ? $this->tpl->blockREplace("Title" , array("title" => $vars["title"])): "",
			"text"	=> $vars["text"] ? $this->tpl->blockREplace("Text" , array("text" => $vars["text"])): "",
			"content"=> $vars["content"],
		);

		return array(
			"content"	=> $this->tpl->blockReplace(
				"Main" , 
				$info
			),
			"before"	=> "",
			"after"		=> "",
		);

	}
	
	
}