<?php


/** 
 *------------------------------------------------------------------------------
 * @package       T4 Page Builder for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2020 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt
 * @forum:		  https://www.joomlart.com/forums/t/t4-builder
 * @Link:         https://demo.t4-builder.joomlart.com/
 *------------------------------------------------------------------------------
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Form\FormField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\LayoutHelper;

class JFormFieldLoadbootstrap extends FormField
{
	protected $type = 'loadbootstrap' ;
	protected $layout = 'layouts.btlayout' ;
	
	protected function getInput()
	{
		if (version_compare(JVERSION, '4',  'ge')) {
			HTMLHelper::_('jquery.framework');
		}
		Factory::getDocument()->addStyleSheet(Uri::base() .  "components/com_t4pagebuilder/assets/css/ja-pagebuilder.css");
		
		return LayoutHelper::render ($this->layout, '',JPATH_ADMINISTRATOR ."/components/com_t4pagebuilder/libs");
	}
	
	protected function getLabel()
	{
		return '<label id="jform_loadbootstrap-lbl" class="control-label" for="jform_loadbootstrap">'.Text::_('COM_T4PAGEBUILDER_BOOTSTRAP_ASSIGN').'</label>';
	}
	
}