<?php

declare(strict_types=1);

use App\Support\References\ReferenceLinkTarget;

it('serializes reference link targets', function (): void {
    $target = new ReferenceLinkTarget(
        targetKind: 'policy_version',
        url: '/admin/t/1/policy-versions/42',
        actionLabel: 'View policy version',
        contextBadge: 'ManagedEnvironment',
    );

    expect($target->toArray())->toBe([
        'targetKind' => 'policy_version',
        'url' => '/admin/t/1/policy-versions/42',
        'actionLabel' => 'View policy version',
        'contextBadge' => 'ManagedEnvironment',
    ]);
});
