<?php
/**
* @package com_spmedical
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2025 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

// No Direct Access
defined ('_JEXEC') or die('Restricted Access');

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Uri\Uri;

require_once JPATH_COMPONENT . '/helpers/helper.php';
HTMLHelper::_('jquery.framework');
$doc = Factory::getDocument();

// Include CSS files
$doc->addStylesheet( Uri::root(true) . '/components/com_spmedical/assets/css/spmedical.css' );
$doc->addStylesheet( Uri::root(true) . '/components/com_spmedical/assets/css/medico-fonts.css' );
$doc->addStylesheet( Uri::root(true) . '/components/com_spmedical/assets/css/spmedical-structure.css' );

// Include JS
$doc->addScript( Uri::root(true) . '/components/com_spmedical/assets/js/spmedical.js' );

$controller = BaseController::getInstance('Spmedical');
$input = Factory::getApplication()->input;
$controller->execute($input->getCmd('task'));
$controller->redirect();
