<?php

/**
 * @package     SP Medical
 * @subpackage  mod_spmedical_services
 *
 * @copyright   Copyright (C) 2010 - 2025 JoomShaper. All rights reserved.
 * @license     GNU General Public License version 2 or later.
 */

// no direct access
defined('_JEXEC') or die('Restricted access!');

use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Helper\ModuleHelper;

require_once __DIR__ . '/helper.php';
require_once JPATH_BASE . '/components/com_spmedical/helpers/helper.php';

$doc = Factory::getDocument();
$doc->addStylesheet( Uri::root(true).'/modules/'.$module->module .'/assets/css/style.css' );
$doc->addStylesheet( Uri::root(true) . '/components/com_spmedical/assets/css/spmedical-structure.css' );

// Get items
$items 			 = modSpmedicalServicesHelper::getDepartments($params);
$moduleclass_sfx = !empty($params->get('moduleclass_sfx')) ? htmlspecialchars($params->get('moduleclass_sfx')) : '';
$columns = htmlspecialchars($params->get('columns', 2));
$dep_layout = htmlspecialchars($params->get('dep_layout', 2));

require ModuleHelper::getLayoutPath('mod_spmedical_services', $params->get('layout') ?? '');