<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Blade;

it('renders unsupported references without hiding the preserved identifier', function (): void {
    $html = Blade::render(
        "@include('filament.infolists.entries.resolved-reference-compact', ['reference' => \$reference])",
        [
            'reference' => [
                'primaryLabel' => 'Legacy provider object',
                'secondaryLabel' => 'External object',
                'stateLabel' => 'Unresolved',
                'stateColor' => 'gray',
                'stateIcon' => 'heroicon-m-question-mark-circle',
                'showStateBadge' => true,
                'isLinkable' => false,
                'linkTarget' => null,
                'technicalDetail' => [
                    'displayId' => '…abcd1234',
                ],
            ],
        ],
    );

    expect($html)->toContain('Legacy provider object')
        ->and($html)->toContain('Unresolved')
        ->and($html)->toContain('…abcd1234');
});
