<?php
/**
 *----------------------------------------------------------------------------
 * iCagenda     Events Management Extension for Joomla!
 *----------------------------------------------------------------------------
 * @version     4.0.0 2025-06-10
 *
 * @package     iCagenda.Admin
 * @subpackage  tmpl.features
 * @link        https://www.joomlic.com
 *
 * @author      Cyril Reze
 * @copyright   (c) 2012-2026 Cyril Reze / JoomliC. All rights reserved.
 * @license     GNU General Public License version 3 or later; see LICENSE.txt
 *
 * @since       3.8.0
 *----------------------------------------------------------------------------
*/

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Layout\LayoutHelper;

$displayData = [
	'textPrefix' => 'COM_ICAGENDA_FEATURES',
	'formURL'    => 'index.php?option=com_icagenda',
//	'helpURL'    => 'https://www.joomlic.com/docs/documentation',
	'icon'       => 'iCicon-tags',
];

$user = Factory::getApplication()->getIdentity();

if ($user->authorise('core.create', 'com_icagenda')
	|| \count($user->getAuthorisedCategories('com_icagenda', 'core.create')) > 0
) {
	$displayData['createURL'] = 'index.php?option=com_icagenda&task=feature.add';
}

echo LayoutHelper::render('joomla.content.emptystate', $displayData);
