is_array($section) )); $assetVersion = static function (string $relativePath): string { $fullPath = __DIR__ . '/' . ltrim($relativePath, '/'); $mtime = is_file($fullPath) ? filemtime($fullPath) : false; return $mtime === false ? '0' : (string) $mtime; }; return [ 'app_id' => 'fx-rates', 'title' => (string) ($manifest['title'] ?? 'Waehrungs-Checker'), 'icon' => 'FX', 'entry_route' => '/apps/fx-rates', 'window_mode' => 'window', 'content_mode' => 'native-module', 'default_width' => 1120, 'default_height' => 760, 'supports_widget' => true, 'supports_tray' => true, 'module_name' => 'finance', 'summary' => (string) ($manifest['description'] ?? 'Waehrungskurse, Verlauf, API und Desktop-Widget fuer manuelle Aktualisierung.'), 'native_module' => [ 'initializer' => 'initFxRatesApp', 'options' => [ 'apiBase' => '/api/fx-rates/index.php?path=v1', 'activeView' => 'overview', 'sections' => $sections, ], 'assets' => [ 'styles' => [ ['href' => '/module-assets/index.php?module=fx-rates&path=assets/css/app.css&v=' . rawurlencode($assetVersion('assets/css/app.css'))], ], 'scripts' => [ ['src' => '/module-assets/index.php?module=fx-rates&path=assets/js/app.js&v=' . rawurlencode($assetVersion('assets/js/app.js'))], ], ], ], ];