@php
$nobleManifestPath = public_path('NobleUI/public/build/manifest.json');
$nobleManifest = is_file($nobleManifestPath)
? json_decode(file_get_contents($nobleManifestPath), true)
: [];
$nobleBuildPath = function (string $key) use ($nobleManifest): ?string {
$file = $nobleManifest[$key]['file'] ?? null;
return $file ? asset('NobleUI/public/build/' . $file) : null;
};
@endphp
@if ($nobleBuildPath('resources/sass/app.scss'))
@endif
@if ($nobleBuildPath('resources/css/custom.css'))
@endif
@stack('plugin-styles')
@stack('style')
{{-- NobleUI color-modes.js deliberately NOT loaded — we enforce light mode
only. Loading it causes a flash-of-dark when the OS is in dark mode
(it reads prefers-color-scheme and overrides data-bs-theme after paint).
When dark mode is implemented later, re-enable with a user-preference
override instead of the OS preference. --}}
@if ($nobleBuildPath('resources/js/app.js'))
@endif
@stack('plugin-scripts')
{{-- TEMPORARILY DISABLED TO DEBUG JS ERROR --}}
{{-- @if ($nobleBuildPath('resources/js/pages/template.js'))
@endif --}}
@stack('custom-scripts')
@stack('scripts')
{{-- Click-to-dial: available app-wide. Rings the logged-in user's own
extension, then dials the number out when they answer. --}}