<?php

use AmadeusAgentur\Nahrstedt\Sitepackage\Service\BrandingService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;

defined('TYPO3_MODE') || die();

/***************
 * Add default RTE configuration
 */
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['bn_sitepackage'] = 'EXT:bn_sitepackage/Configuration/RTE/Default.yaml';






/***************
 * BE login window styling
 */

if (TYPO3_MODE === 'BE') {
    $signalSlotDispatcher = GeneralUtility::makeInstance(Dispatcher::class);

    /**
     * Add backend styling
     */
    $signalSlotDispatcher->connect(
        ExtensionManagementService::class,
        'hasInstalledExtensions',
        BrandingService::class,
        'setBackendStyling'
    );

}
