{{-- Reseller white-label shell: collapsible sidebar + sticky topbar + theme toggle + language switcher. The brand seed is injected into :root from the RESELLER panel (panel_brand() reads the panel bound by EnsureReseller), so the whole primary-* scale — buttons, links, focus rings, active nav — re-themes to the reseller's own colour without recompiling a single line of CSS. --}} @php $panel = current_panel(); @endphp @php // The footer's "Powered by" used to hard-code RedFamosa by hand. Two things // were wrong: the provider name comes from ITS panel (a buyer who renames // their install has no reason to keep seeing ours), and the plans sold as // white-label promise "remove_branding" — charging for it and still // signing the reseller's panel is not delivering what was sold. $rfPanel = current_panel(); $rfParent = $rfPanel?->parent; $poweredBy = $rfParent?->name ?: config('app.name'); $rfHideBranding = $rfPanel && \App\Services\Plans\PlanLimits::for($rfPanel)->allows('remove_branding'); @endphp {{ $title ?? __('Dashboard') }} — {{ $panel?->name ?? config('app.name', 'RedFamosa') }} @php $rfFavicon = panel_favicon_url(); @endphp @if ($rfFavicon) @else @endif {{-- Apply the saved theme before paint to avoid a flash of the wrong theme. --}} {{-- Per-panel brand seed — the primary scale derives from this at runtime. --}} @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles {{-- Impersonation banner — shown while an admin is viewing as this reseller. --}} @if (session('impersonator_id'))
{{ __('You are viewing the panel as :name.', ['name' => auth()->user()->display_name ?? auth()->user()->name]) }} {{ __('Return to admin') }}
@endif
@include('panel.partials.sidebar') {{-- Mobile sidebar backdrop --}}
@include('panel.partials.topbar')
{{ $slot }}
{{-- Toast host — Livewire components dispatch a `toast` browser event. --}}
{{-- Welcome + base commission. It lives in the SHELL and not on a screen because a reseller handed a fresh account lands wherever they land — dashboard, My Services or Margins & Pricing — and until this is answered the panel resells the whole catalogue at cost and earns nothing. The component decides for itself whether it applies and renders an empty root when it does not. --}} @livewire('reseller.margin-onboarding') {{-- The one confirmation dialog every destructive control routes through. --}} {{-- "Powered by" branding — hidden when the reseller's plan includes remove_branding. --}} @php $removeBranding = $panel && $panel->isReseller() && \App\Services\Plans\PlanLimits::for($panel)->allows('remove_branding'); @endphp @unless ($removeBranding)
@unless ($rfHideBranding)Powered by {{ $poweredBy }}@endunless
@endunless @livewireScripts @stack('scripts')