{{ __('Admin') }} {{ __('Settings') }} {{ __('Mobile push') }}
{{ __('Admin - Project settings') }}

{{ __('Mobile app push') }} {{ __('(FCM)') }}.

{{ __('Push notifications wake the mobile app when it is backgrounded or killed, so operators never miss an inbound WhatsApp message. The service-account JSON is encrypted at rest and used only server-side to sign FCM requests. Until it is set, push is off and everything else keeps working.') }}

{{ __('All settings') }}
{{-- Status strip --}}
{{ __('Push status') }}
{{ $enabled ? __('Enabled') : __('Off') }}
{{ __('Service account') }}
{{ $serviceAccountSet ? __('Configured') : __('Not set') }}
{{ __('Project') }}
{{ $saProjectId ?: ($projectId ?: '—') }}
{{ __('Registered devices') }}
{{ number_format($tokenCount) }}
{{-- Body: form (left) + how-to guide (right) --}}
{{-- LEFT — the form --}}
@csrf
{{ __('Firebase credentials') }}

{{ __('Paste the FULL JSON. Leave blank to keep the existing one. Encrypted at rest — the stored value is never shown back.') }}

@if ($serviceAccountSet)
{{ __('Current') }}: {{ $clientEmail ?: '—' }}
@endif
{{-- RIGHT — how to get the JSON --}}
{{ __('How to get your Firebase service-account JSON') }}
  1. 1 {{ __('Open') }} console.firebase.google.com {{ __('and select your project (or create one).') }}
  2. 2 {{ __('Click the') }} ⚙ {{ __('gear') }} {{ __('(top-left) →') }} {{ __('Project settings') }}.
  3. 3 {{ __('Open the') }} {{ __('Service accounts') }} {{ __('tab.') }}
  4. 4 {{ __('Click') }} {{ __('Generate new private key') }} → {{ __('Generate key') }}. {{ __('A') }} .json {{ __('file downloads.') }}
  5. 5 {{ __('Open that file, copy the') }} {{ __('entire') }} {{ __('contents, and paste it into the box on the left.') }}
  6. 6 {{ __('Click') }} {{ __('Save push settings') }}. {{ __('Push turns on immediately.') }}

{{ __('The mobile app must use the SAME Firebase project (the app developer adds google-services.json / GoogleService-Info.plist to the app). "Firebase Cloud Messaging API (V1)" is enabled by default — no extra step.') }}