TenantAtlas/resources/views/filament/partials/diff/row.blade.php
2026-03-14 13:31:24 +01:00

26 lines
772 B
PHP

@php
use App\Support\Diff\DiffRow;
use App\Support\Diff\DiffRowStatus;
$row = $row ?? null;
$compact = (bool) ($compact ?? false);
$dimUnchanged = (bool) ($dimUnchanged ?? true);
$partial = $row instanceof DiffRow
? match ($row->status) {
DiffRowStatus::Changed => 'filament.partials.diff.row-changed',
DiffRowStatus::Added => 'filament.partials.diff.row-added',
DiffRowStatus::Removed => 'filament.partials.diff.row-removed',
DiffRowStatus::Unchanged => 'filament.partials.diff.row-unchanged',
}
: null;
@endphp
@if (is_string($partial))
@include($partial, [
'row' => $row,
'compact' => $compact,
'dimUnchanged' => $dimUnchanged,
])
@endif