<?php

declare(strict_types=1);

use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Lang;

it('falls back to English for missing German translation lines', function (): void {
    Lang::addLines(['localization.fallback_probe' => 'English fallback probe'], 'en');

    App::setFallbackLocale('en');
    App::setLocale('de');

    expect(__('localization.fallback_probe'))->toBe('English fallback probe');
});

it('does not expose raw translation keys for supported first-wave catalogs', function (): void {
    App::setLocale('de');

    expect(__('localization.auth.sign_in_microsoft'))->not->toBe('localization.auth.sign_in_microsoft')
        ->and(__('baseline-compare.button_view_findings'))->not->toBe('baseline-compare.button_view_findings')
        ->and(__('findings.rbac.restore_unsupported'))->not->toBe('findings.rbac.restore_unsupported');
});
